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

Function getAngularDecorators

packages/core/schematics/utils/ng_decorators.ts:27–40  ·  view source on GitHub ↗
(
  typeChecker: ts.TypeChecker,
  decorators: ReadonlyArray<ts.Decorator>,
)

Source from the content-addressed store, hash-verified

25 * from a list of decorators.
26 */
27export function getAngularDecorators(
28 typeChecker: ts.TypeChecker,
29 decorators: ReadonlyArray<ts.Decorator>,
30): NgDecorator[] {
31 return decorators
32 .map((node) => ({node, importData: getCallDecoratorImport(typeChecker, node)}))
33 .filter(({importData}) => importData && importData.importModule.startsWith('@angular/'))
34 .map(({node, importData}) => ({
35 node: node as CallExpressionDecorator,
36 name: importData!.name,
37 moduleName: importData!.importModule,
38 importNode: importData!.node,
39 }));
40}

Callers 15

visitNodeFunction · 0.90
analyzeMethod · 0.90
analyzeFileFunction · 0.90
visitMethod · 0.90
analyzeClassMethod · 0.90
analyzeBootstrapCallFunction · 0.90
analyzeTestingModulesFunction · 0.90
findNgModuleDecoratorFunction · 0.90

Calls 3

getCallDecoratorImportFunction · 0.90
mapMethod · 0.80
filterMethod · 0.45

Tested by

no test coverage detected