Interface Queryable<TRequest, TNext, TError, TState>

interface Queryable<TRequest, TNext, TError, TState> {
    acks: Observable<Action<void | TRequest>>;
    cancelations: Observable<Action<void>>;
    commands: Observable<Action<void | TRequest>>;
    currentError: BehaviorSubject<null | TError>;
    endings: Observable<Action<void | TError>>;
    errors: Observable<TError>;
    events: Observable<Action<void | TRequest | TNext | TError>>;
    finalizers: Observable<Action<void | TError>>;
    isActive: BehaviorSubject<boolean>;
    isHandling: BehaviorSubject<boolean>;
    observe: ((cbs) => Subscription);
    onceInactive: (() => Promise<false>);
    onceSettled: (() => Promise<false>);
    responses: Observable<TNext>;
    starts: Observable<Action<TRequest>>;
    state: BehaviorSubject<TState>;
    updates: Observable<Action<void | TRequest | TNext | TError>>;
}

Type Parameters

  • TRequest
  • TNext
  • TError
  • TState

Hierarchy (view full)

Properties

acks: Observable<Action<void | TRequest>>

An Observable of just start and canceled events of this service.

cancelations: Observable<Action<void>>

An Observable of just canceled events of this service.

commands: Observable<Action<void | TRequest>>

An Observable of just request, cancel events.

currentError: BehaviorSubject<null | TError>

Contains the last error object, but becomes null at the start of the next handling.

endings: Observable<Action<void | TError>>

An Observable of just the complete and error events of this service.

An Observable of just the error events of this service.

events: Observable<Action<void | TRequest | TNext | TError>>

An Observable of all events of this service.

finalizers: Observable<Action<void | TError>>

An Observable of just the complete, error, and canceled events of this service.

isActive: BehaviorSubject<boolean>

Becomes false the Promise after isHandling becomes false, when no more requests are scheduled to start.

isHandling: BehaviorSubject<boolean>

Indicates whether a handling is in progress. Use .value, or subscribe() for updates.

observe: ((cbs) => Subscription)

Creates an independent subscription, invoking callbacks on process lifecycle events

Type declaration

onceInactive: (() => Promise<false>)

The next time (including the present) this service is inactive. Represents the completion of an already-running service.

Type declaration

    • (): Promise<false>
    • Returns Promise<false>

onceSettled: (() => Promise<false>)

The next time isActive turns from true to false. Represents the completion of a not-yet-running service.

Type declaration

    • (): Promise<false>
    • Returns Promise<false>

responses: Observable<TNext>

An Observable of just the next events of this service.

An Observable of just started events.

Uses the reducer to aggregate the events that are produced from its handlers, emitting a new state for each action (de-duping is not done). Use .value, or subscribe() for updates.

updates: Observable<Action<void | TRequest | TNext | TError>>

An Observable of just started, next, complete, error , and canceled events.