Type alias PromiseExecutor<T>

PromiseExecutor<T>: ((resolve, reject) => void)

A function type that defines how a promise should be executed.

Type Parameters

  • T

    The type of data that will be resolved

Type declaration

    • (resolve, reject): void
    • Parameters

      • resolve: ((data) => void)
          • (data): void
          • Parameters

            • data: T

            Returns void

      • reject: ((reason) => void)
          • (reason): void
          • Parameters

            • reason: unknown

            Returns void

      Returns void