* 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>)
| 60 | * prefetching behavior. |
| 61 | */ |
| 62 | function clearDirectiveDefs(type: Type<unknown>): void { |
| 63 | const cmpDef = getComponentDef(type); |
| 64 | cmpDef!.dependencies = []; |
| 65 | cmpDef!.directiveDefs = null; |
| 66 | } |
| 67 | |
| 68 | /** |
| 69 | * Emulates a dynamic import promise. |
no test coverage detected