MCPcopy Index your code
hub / github.com/angular/angular / canRemoveCommonModule

Function canRemoveCommonModule

packages/core/schematics/utils/parse_html.ts:128–137  ·  view source on GitHub ↗
(template: string)

Source from the content-addressed store, hash-verified

126 * determines if the CommonModule can be safely removed from imports
127 */
128export function canRemoveCommonModule(template: string): boolean {
129 const parsed = parseTemplate(template);
130 let removeCommonModule = false;
131 if (parsed.tree !== undefined) {
132 const visitor = new CommonCollector();
133 visitAll(visitor, parsed.tree.rootNodes);
134 removeCommonModule = visitor.count === 0;
135 }
136 return removeCommonModule;
137}
138
139/** Finds all non-control flow elements from common module. */
140class CommonCollector extends RecursiveVisitor {

Callers 2

migrateNgClassBindingsFunction · 0.90
migrateNgStyleBindingsFunction · 0.90

Calls 2

visitAllFunction · 0.90
parseTemplateFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…