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

Function clearRendererCache

packages/core/src/render3/hmr.ts:212–217  ·  view source on GitHub ↗

* Removes any cached renderers from the factory for the provided type. * This is currently used by the HMR logic to ensure Renderers are kept * synchronized with any definition metadata updates. * @param factory A RendererFactory2 instance. * @param def A ComponentDef instance.

(factory: RendererFactory, def: ComponentDef<unknown>)

Source from the content-addressed store, hash-verified

210 * @param def A ComponentDef instance.
211 */
212function clearRendererCache(factory: RendererFactory, def: ComponentDef<unknown>) {
213 // Cast to read a private field.
214 // NOTE: This must be kept synchronized with the renderer factory implementation in
215 // platform-browser and platform-browser/animations.
216 (factory as {componentReplaced?: (id: string) => void}).componentReplaced?.(def.id);
217}
218
219/**
220 * Recreates an LView in-place from a new component definition.

Callers 1

recreateFunction · 0.85

Calls 1

componentReplacedMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…