MCPcopy Create free account
hub / github.com/angular/dev-infra / isNodeJSWrappedError

Function isNodeJSWrappedError

ng-dev/utils/nodejs-errors.ts:13–18  ·  view source on GitHub ↗
(
  value: Error | unknown,
  errorType: T,
)

Source from the content-addressed store, hash-verified

11 * The narrowed type will include the NodeJS `ErrnoException` properties.
12 */
13export 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}

Callers 1

readFileGracefullyFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected