is-promise.d.ts 259 B

12345678910
  1. /**
  2. * Check whether a value is a Promise-like
  3. * instance. Recognizes both native promises
  4. * and third-party promise libraries.
  5. *
  6. * @param value
  7. */
  8. export declare function isPromise<T>(
  9. value: T | PromiseLike<T> | undefined
  10. ): value is PromiseLike<T>;