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

Function nonCollidingImportName

packages/language-service/src/utils/ts_utils.ts:334–343  ·  view source on GitHub ↗
(
  importDeclarations: ts.ImportDeclaration[],
  name: string,
)

Source from the content-addressed store, hash-verified

332 * symbol.
333 */
334export function nonCollidingImportName(
335 importDeclarations: ts.ImportDeclaration[],
336 name: string,
337): string {
338 const possibleNames = suggestAlternativeSymbolNames(name);
339 while (importCollisionExists(importDeclarations, name)) {
340 name = possibleNames.next().value;
341 }
342 return name;
343}
344
345/**
346 * If the provided trait is standalone, just return it. Otherwise, returns the owning ngModule.

Callers 2

ts_utils_spec.tsFile · 0.90

Calls 3

importCollisionExistsFunction · 0.85
nextMethod · 0.45

Tested by

no test coverage detected