MCPcopy Index your code
hub / github.com/angular/angular / assertDefined

Function assertDefined

packages/core/src/util/assert.ts:103–107  ·  view source on GitHub ↗
(actual: T | null | undefined, msg: string)

Source from the content-addressed store, hash-verified

101}
102
103export function assertDefined<T>(actual: T | null | undefined, msg: string): asserts actual is T {
104 if (actual == null) {
105 throwError(msg, actual, null, '!=');
106 }
107}
108
109export function throwError(msg: string): never;
110export function throwError(msg: string, actual: any, expected: any, comparison: string): never;

Callers 15

getItemMethod · 0.90
createComponentMethod · 0.90
createTemplateRefFunction · 0.90
detachMovedViewFunction · 0.90
assertTNodeTypeFunction · 0.90
assertTNodeFunction · 0.90
assertTIcuFunction · 0.90
assertHasParentFunction · 0.90
assertLContainerFunction · 0.90
assertLViewFunction · 0.90
assertProjectionSlotsFunction · 0.90

Calls 1

throwErrorFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…