(value?: T | PromiseLike<T>)
| 36 | * A simple function to test if the value is a promise/thenable |
| 37 | */ |
| 38 | export function isPromise<T>(value?: T | PromiseLike<T>): value is PromiseLike<T> { |
| 39 | return value != null |
| 40 | && typeof value === 'object' |
| 41 | && 'then' in value |
| 42 | && typeof value.then === 'function' |
| 43 | } |
| 44 | |
| 45 | /** @returns true if the error is `ERR_UNKNOWN_FILE_EXTENSION` */ |
| 46 | export function isLoaderError(error: unknown): error is Error { |
no outgoing calls
no test coverage detected