( value: T | PromiseLike<T> | undefined, )
| 39 | * @param value - The value to check. |
| 40 | */ |
| 41 | export function isPromiseLike<T>( |
| 42 | value: T | PromiseLike<T> | undefined, |
| 43 | ): value is PromiseLike<T> { |
| 44 | if (!value) return false; |
| 45 | if (typeof value !== 'object' && typeof value !== 'function') return false; |
| 46 | return typeof (value as PromiseLike<T>).then === 'function'; |
| 47 | } |
| 48 | |
| 49 | /** |
| 50 | * Get nested properties of an object by path |
no outgoing calls
no test coverage detected