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

Function createResolver

docs/app/js/sanddance-app.js:26357–26366  ·  view source on GitHub ↗
(local)

Source from the content-addressed store, hash-verified

26355 * Set up a ref resolver function given internal state managed for the ref.
26356 * @param local Set
26357 */ var createResolver = function(local) {
26358 return function(newValue) {
26359 for(var _i = 0, _a = local.refs; _i < _a.length; _i++){
26360 var ref = _a[_i];
26361 if (typeof ref === "function") ref(newValue);
26362 else if (ref) // work around the immutability of the React.Ref type
26363 ref.current = newValue;
26364 }
26365 };
26366};
26367var createMergedRef = function(value) {
26368 var local = {
26369 refs: []

Callers 1

createMergedRefFunction · 0.85

Calls 1

refFunction · 0.70

Tested by

no test coverage detected