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

Function getConstant

packages/core/src/render3/util/view_utils.ts:187–194  ·  view source on GitHub ↗
(
  consts: TConstants | null,
  index: number | null | undefined,
)

Source from the content-addressed store, hash-verified

185 index: number | null | undefined,
186): T | null;
187export function getConstant<T>(
188 consts: TConstants | null,
189 index: number | null | undefined,
190): T | null {
191 if (index === null || index === undefined) return null;
192 ngDevMode && assertIndexInRange(consts!, index);
193 return consts![index] as unknown as T;
194}
195
196/**
197 * Resets the pre-order hook flags of the view.

Callers 12

domOnlyFirstCreatePassFunction · 0.90
ɵɵconditionalCreateFunction · 0.90
ɵɵrepeaterCreateFunction · 0.90
ɵɵi18nStartFunction · 0.90
ɵɵi18nAttributesFunction · 0.90
ɵɵtemplateFunction · 0.90
ɵɵdomTemplateFunction · 0.90

Calls 1

assertIndexInRangeFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…