Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IPromiseOptions<Pending, Success, Error>

Parameters for notification depending on a promise.

Type parameters

  • Pending: ReadonlyJSONValue

  • Success: ReadonlyJSONValue = Pending

  • Error: ReadonlyJSONValue = Pending

Hierarchy

  • IPromiseOptions

Index

Properties

Properties

error

error: { message: (reason: unknown, data?: Error) => string; options?: IOptions<Error> }

Message when promise rejects and options

The message factory receives as first argument the error of the promise and as second the error options.data.

Notes

The message will be truncated if longer than 140 characters.

Type declaration

  • message: (reason: unknown, data?: Error) => string
      • (reason: unknown, data?: Error): string
      • Parameters

        • reason: unknown
        • Optional data: Error

        Returns string

  • Optional options?: IOptions<Error>

pending

pending: { message: string; options?: IOptions<Pending> }

Promise pending message and options

Notes

The message will be truncated if longer than 140 characters.

Type declaration

  • message: string
  • Optional options?: IOptions<Pending>

success

success: { message: (result: unknown, data?: Success) => string; options?: IOptions<Success> }

Message when promise resolves and options

The message factory receives as first argument the result of the promise and as second the success options.data.

Notes

The message will be truncated if longer than 140 characters.

Type declaration

  • message: (result: unknown, data?: Success) => string
      • (result: unknown, data?: Success): string
      • Parameters

        • result: unknown
        • Optional data: Success

        Returns string

  • Optional options?: IOptions<Success>

Generated using TypeDoc