(value: unknown)
| 4 | * @returns True if the value is promise-like, false otherwise |
| 5 | */ |
| 6 | export function isPromiseLike(value: unknown): value is PromiseLike<unknown> { |
| 7 | return ( |
| 8 | !!value && |
| 9 | (typeof value === `object` || typeof value === `function`) && |
| 10 | typeof (value as { then?: unknown }).then === `function` |
| 11 | ) |
| 12 | } |
no outgoing calls
no test coverage detected