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

Method addImport

packages/compiler-cli/preprocessor/src/tcb.ts:335–342  ·  view source on GitHub ↗
(moduleSpecifier: string)

Source from the content-addressed store, hash-verified

333 constructor(private readonly namespaceAliasConflicts: ReadonlySet<string> = new Set()) {}
334
335 addImport(moduleSpecifier: string): string {
336 let alias = this.imports.get(moduleSpecifier);
337 if (alias === undefined) {
338 alias = allocateNamespaceAlias(this.nextIndex++, this.namespaceAliasConflicts);
339 this.imports.set(moduleSpecifier, alias);
340 }
341 return alias;
342 }
343
344 generateImportStatements(): string {
345 let result = '';

Callers 1

generateTcbCodeFunction · 0.95

Calls 3

allocateNamespaceAliasFunction · 0.85
getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected