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

Function getSignalGraph

packages/core/src/render3/util/signal_debug.ts:206–226  ·  view source on GitHub ↗
(injector: Injector)

Source from the content-addressed store, hash-verified

204 * @throws If the injector is an environment injector.
205 */
206export function getSignalGraph(injector: Injector): DebugSignalGraph {
207 let templateConsumer: ReactiveLViewConsumer | null = null;
208
209 if (!(injector instanceof NodeInjector) && !(injector instanceof R3Injector)) {
210 return throwError('getSignalGraph must be called with a NodeInjector or R3Injector');
211 }
212
213 if (injector instanceof NodeInjector) {
214 templateConsumer = getTemplateConsumer(injector as NodeInjector);
215 }
216
217 const nonTemplateEffectNodes = extractEffectsFromInjector(injector);
218
219 const signalNodes = templateConsumer
220 ? [templateConsumer, ...nonTemplateEffectNodes]
221 : nonTemplateEffectNodes;
222
223 const signalDependenciesMap = extractSignalNodesAndEdgesFromRoots(signalNodes);
224
225 return getNodesAndEdgesFromSignalMap(signalDependenciesMap);
226}

Callers 2

signal_graph.tsFile · 0.90

Calls 5

throwErrorFunction · 0.90
getTemplateConsumerFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…