* Clears all associated directive defs from a given component class. * * This is a *hack* for TestBed, which compiles components in JIT mode * and can not remove dependencies and their imports in the same way as AOT. * From JIT perspective, all dependencies inside a defer block remain eager. *
(type: Type<unknown>)
| 68 | * prefetching behavior. |
| 69 | */ |
| 70 | function clearDirectiveDefs(type: Type<unknown>): void { |
| 71 | const cmpDef = getComponentDef(type); |
| 72 | cmpDef!.dependencies = []; |
| 73 | cmpDef!.directiveDefs = null; |
| 74 | } |
| 75 | |
| 76 | /** |
| 77 | * Emulates a dynamic import promise. |
no test coverage detected
searching dependent graphs…