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

    Class StaticRequestState<T>

    A RequestState which always returns the same value immediately

    Type Parameters

    • T

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    error: Signal<undefined> = ...

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

    failed: Signal<false> = ...

    Emits true if the request failed

    loading: Signal<false> = ...

    Emits true when the request is running

    request$: Observable<T>

    The underlying request

    result: Signal<T>

    The result of the request, or undefined when unresolved

    result$: Observable<T>

    The result of the request

    Methods

    • Perform actions when the request finishes

      Parameters

      • next: (value: T) => void

        Action to perform on successful resolution

      • Optional_error: (error: Error) => void

        Action to perform on error

      Returns this