Represents the result of an operation.

interface IResult<Data extends any = any, Payload extends any = object> {
    error: boolean;
    execute: (p?: Payload) => Promise<null | Data>;
    loading: boolean;
}

Type Parameters

  • Data extends any = any

    The type of data returned by the operation.

  • Payload extends any = object

    The type of payload accepted by the execute method.

Properties

Properties

error: boolean
execute: (p?: Payload) => Promise<null | Data>
loading: boolean