MCPcopy Index your code
hub / github.com/angular/angular-cli / assertIsError

Function assertIsError

tests/e2e/utils/utils.ts:40–46  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

38}
39
40export function assertIsError(value: unknown): asserts value is Error & { code?: string } {
41 const isError =
42 value instanceof Error ||
43 // The following is needing to identify errors coming from RxJs.
44 (typeof value === 'object' && value && 'name' in value && 'message' in value);
45 assert(isError, 'catch clause variable is not an Error instance');
46}

Callers 4

killProcessFunction · 0.90
add-material.tsFile · 0.90
test-sourcemap.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected