( value: Error | unknown, errorType: T, )
| 11 | * The narrowed type will include the NodeJS `ErrnoException` properties. |
| 12 | */ |
| 13 | export function isNodeJSWrappedError<T extends new (...args: any) => Error>( |
| 14 | value: Error | unknown, |
| 15 | errorType: T, |
| 16 | ): value is InstanceType<T> & NodeJS.ErrnoException { |
| 17 | return value instanceof errorType; |
| 18 | } |
no outgoing calls
no test coverage detected