@juulsgaard/signal-tools
    Preparing search index...

    Class ErrorRequestState<T>

    A RequestState which always emits an error

    Type Parameters

    • T

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    error: Signal<Error | undefined>

    Emits the error if one is thrown by the request. Otherwise undefined

    failed: Signal<boolean> = ...

    Emits true if the request failed

    loading: Signal<boolean> = ...

    Emits true when the request is running

    request$: Observable<never>

    The underlying request

    result: Signal<undefined> = ...

    The result of the request, or undefined when unresolved

    result$: Observable<never> = EMPTY

    The result of the request

    Methods

    • Perform actions when the request finishes

      Parameters

      • onValue: (value: T) => void

        Action to perform on successful resolution

      • OptionalonError: (error: Error) => void

        Action to perform on error

      Returns this