vuoto
Version:
Modern whitespace normalizer CLI with enhanced output and developer experience - cut the noise, clean the void
21 lines • 616 B
TypeScript
/**
* A typeguarded version of `instanceof Error` for NodeJS.
* @param value The value to check.
* @param errorType The error type to check against.
*
* @returns True if the value is an instance of the given error type and has NodeJS-specific error properties.
*
* @example
*
* ```ts
* try {
* // ...
* } catch (error) {
* if (instanceOfNodeError(error, TypeError)) {
* console.error(error.code);
* }
* }
* ```
*/
export declare function instanceOfNodeError(value: unknown, errorType: ErrorConstructor): value is NodeJS.ErrnoException;
//# sourceMappingURL=instance-of-node-error.d.ts.map