MCPcopy Create free account
hub / github.com/angular/angular / getIdentifier

Function getIdentifier

packages/compiler-cli/preprocessor/test/indexer_spec.ts:119–128  ·  view source on GitHub ↗
(
  comp: IndexedComponent,
  kind: IdentifierKind,
  name: string,
)

Source from the content-addressed store, hash-verified

117}
118
119function getIdentifier<T extends TopLevelIdentifier = TopLevelIdentifier>(
120 comp: IndexedComponent,
121 kind: IdentifierKind,
122 name: string,
123): T {
124 const identifiers = Array.from(comp.template.identifiers);
125 const found = identifiers.find((id) => id.kind === kind && id.name === name);
126 expect(found).toBeDefined();
127 return found as T;
128}
129
130function getIdentifiers<T extends TopLevelIdentifier = TopLevelIdentifier>(
131 comp: IndexedComponent,

Callers 1

indexer_spec.tsFile · 0.85

Calls 2

fromMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected