reactiveweb
    Preparing search index...

    Interface State<Result>

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

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

    Type Parameters

    • Result
    Index

    Properties

    Methods

    Properties

    error: undefined | null | Error

    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: undefined | Result

    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: null | Error; isLoading: boolean; resolved: undefined | Result }