35fea10438fa6e959d6eed5501a682c83dd36f204f0bf4eed37a85702e7f2dac1a7e7f353ce628b19237c617ad57cf8b78d6561306758c5412c7c9e2059f82 236 B

123456789
  1. import { isFunction } from "./isFunction";
  2. /**
  3. * Tests to see if the object is "thennable".
  4. * @param value the object to test
  5. */
  6. export function isPromise(value: any): value is PromiseLike<any> {
  7. return isFunction(value?.then);
  8. }