( promise: Promise<T> | T )
| 5 | * @returns true if the value is thenable |
| 6 | */ |
| 7 | export function isThenable<T = unknown>( |
| 8 | promise: Promise<T> | T |
| 9 | ): promise is Promise<T> { |
| 10 | return ( |
| 11 | promise !== null && |
| 12 | typeof promise === 'object' && |
| 13 | 'then' in promise && |
| 14 | typeof promise.then === 'function' |
| 15 | ) |
| 16 | } |
no outgoing calls
no test coverage detected