reactiveweb
    Preparing search index...

    Interface State<Result>

    The state of a Value or Promise that was passed to getPromiseState

    interface State<Result> {
        error: Error | null | undefined;
        isLoading: boolean;
        resolved: Result | undefined;
        toJSON(): {
            error: Error
            | null;
            isLoading: boolean;
            resolved: Result | undefined;
        };
    }

    Type Parameters

    • Result
    Index

    Properties

    Methods

    Properties

    error: Error | null | undefined

    If the value passed to getPromiseState was a promise or function, this will be the value thrown / caught from the promise or function.

    isLoading: boolean

    If the value passed to getPromiseState was a promise or function that returns a promise, this will initially be true, and become false when the promise resolves or errors.

    resolved: Result | undefined

    The final value. This will be undefined initially if the value passed in to getPromiseState is a promise or function that returns a promise.

    Methods

    • JSON Serializer for inspecting the full State

      Returns { error: Error | null; isLoading: boolean; resolved: Result | undefined }