Skip to main content
Module

x/tsafe/isPromiseLike.ts

🔩 The missing TypeScript utils
Latest
File
// eslint-disable-next-line @typescript-eslint/no-explicit-anyexport function isPromiseLike<T = void>(o: any): o is PromiseLike<T> { return typeof o === "object" && o !== null && "then" in o && typeof o.then === "function";}