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

Function parseSignal

docs/app/js/sanddance-app.js:147050–147064  ·  view source on GitHub ↗
(signal, scope)

Source from the content-addressed store, hash-verified

147048 (0, _vegaUtil.error)(prefix + ' for "outer" push: ' + (0, _vegaUtil.stringValue)(name));
147049}
147050function parseSignal(signal, scope) {
147051 const name = signal.name;
147052 if (signal.push === OUTER) {
147053 // signal must already be defined, raise error if not
147054 if (!scope.signals[name]) outerError("No prior signal definition", name); // signal push must not use properties reserved for standard definition
147055 OUTER_INVALID.forEach((prop)=>{
147056 if (signal[prop] !== undefined) outerError("Invalid property ", prop);
147057 });
147058 } else {
147059 // define a new signal in the current scope
147060 const op = scope.addSignal(name, signal.value);
147061 if (signal.react === false) op.react = false;
147062 if (signal.bind) scope.addBinding(name, signal.bind);
147063 }
147064}
147065function Entry(type, value6, params, parent) {
147066 this.id = -1;
147067 this.type = type;

Callers 2

parseScopeFunction · 0.70
parseViewFunction · 0.70

Calls 2

outerErrorFunction · 0.70
forEachMethod · 0.45

Tested by

no test coverage detected