index.d.ts 273 B

12345678910111213
  1. /**
  2. * Check if `input` is a ES2015 promise.
  3. *
  4. * @param input - Value to be checked.
  5. *
  6. * @example
  7. *
  8. * import isPromise from 'p-is-promise';
  9. *
  10. * isPromise(Promise.resolve('🦄'));
  11. * //=> true
  12. */
  13. export default function(input: unknown): input is Promise<unknown>;