MCPcopy Index your code
hub / github.com/microsoft/SandDance / extractSignalValuesFromView

Function extractSignalValuesFromView

packages/sanddance/src/signals.ts:17–32  ·  view source on GitHub ↗
(view: View, spec: Spec)

Source from the content-addressed store, hash-verified

15}
16
17export function extractSignalValuesFromView(view: View, spec: Spec) {
18 if (!view || !spec || !spec.signals || !spec.signals.length) return;
19 const result: SignalValues = {};
20 spec.signals.forEach((signalA: NewSignal) => {
21 //bound to a UI control
22 if (signalA.bind) {
23 try {
24 result[signalA.name] = view.signal(signalA.name);
25 }
26 catch (e) {
27 // continue regardless of error
28 }
29 }
30 });
31 return result;
32}

Callers 2

renderNewLayoutMethod · 0.90
getSignalValuesMethod · 0.90

Calls 2

forEachMethod · 0.45
signalMethod · 0.45

Tested by

no test coverage detected