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

Function clearDirectiveDefs

packages/core/test/acceptance/defer_spec.ts:70–74  ·  view source on GitHub ↗

* 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>)

Source from the content-addressed store, hash-verified

68 * prefetching behavior.
69 */
70function 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.

Callers 2

createFixtureFunction · 0.85
defer_spec.tsFile · 0.85

Calls 1

getComponentDefFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…