MCPcopy Create free account
hub / github.com/angular/angular / getSignalGraph

Function getSignalGraph

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

Source from the content-addressed store, hash-verified

174 * @throws If the injector is an environment injector.
175 */
176export function getSignalGraph(injector: Injector): DebugSignalGraph {
177 let templateConsumer: ReactiveLViewConsumer | null = null;
178
179 if (!(injector instanceof NodeInjector) && !(injector instanceof R3Injector)) {
180 return throwError('getSignalGraph must be called with a NodeInjector or R3Injector');
181 }
182
183 if (injector instanceof NodeInjector) {
184 templateConsumer = getTemplateConsumer(injector as NodeInjector);
185 }
186
187 const nonTemplateEffectNodes = extractEffectsFromInjector(injector);
188
189 const signalNodes = templateConsumer
190 ? [templateConsumer, ...nonTemplateEffectNodes]
191 : nonTemplateEffectNodes;
192
193 const signalDependenciesMap = extractSignalNodesAndEdgesFromRoots(signalNodes);
194
195 return getNodesAndEdgesFromSignalMap(signalDependenciesMap);
196}

Callers 2

signal_graph.tsFile · 0.90

Calls 5

throwErrorFunction · 0.90
getTemplateConsumerFunction · 0.85

Tested by

no test coverage detected