ng-module-imports.ts (material2-7.3.3) | : | ng-module-imports.ts (material2-7.3.4) | ||
---|---|---|---|---|
skipping to change at line 52 | skipping to change at line 52 | |||
} | } | |||
/** | /** | |||
* Resolves the last identifier that is part of the given expression. This helps resolving | * Resolves the last identifier that is part of the given expression. This helps resolving | |||
* identifiers of nested property access expressions (e.g. myNamespace.core.NgMo dule). | * identifiers of nested property access expressions (e.g. myNamespace.core.NgMo dule). | |||
*/ | */ | |||
function resolveIdentifierOfExpression(expression: ts.Expression): ts.Identifier | null { | function resolveIdentifierOfExpression(expression: ts.Expression): ts.Identifier | null { | |||
if (ts.isIdentifier(expression)) { | if (ts.isIdentifier(expression)) { | |||
return expression; | return expression; | |||
} else if (ts.isPropertyAccessExpression(expression)) { | } else if (ts.isPropertyAccessExpression(expression)) { | |||
return resolveIdentifierOfExpression(expression.expression); | return expression.name; | |||
} | } | |||
return null; | return null; | |||
} | } | |||
/** | /** | |||
* Finds a NgModule declaration within the specified TypeScript node and returns the | * Finds a NgModule declaration within the specified TypeScript node and returns the | |||
* corresponding metadata for it. This function searches breadth first because | * corresponding metadata for it. This function searches breadth first because | |||
* NgModule's are usually not nested within other expressions or declarations. | * NgModule's are usually not nested within other expressions or declarations. | |||
*/ | */ | |||
function findNgModuleMetadata(rootNode: ts.Node): ts.ObjectLiteralExpression | n ull { | function findNgModuleMetadata(rootNode: ts.Node): ts.ObjectLiteralExpression | n ull { | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added |