How to use the @effectful/serialization.descriptorSymbol function in @effectful/serialization

To help you get started, we’ve selected a few @effectful/serialization examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github awto / effectfuljs / packages / debugger / src / kit.js View on Github external
function constr($$) {
    const proto = Object.create(FramePrototype);
    proto.$meta = info;
    proto.$$ = $$;
    proto.$run = info.handler;
    proto.$err = info.errHandler;
    const closure = info.func(proto);
    closure[metaDataSymbol] = proto;
    closure[S.descriptorSymbol] = funcDescr;
    // proto[S.descriptorSymbol] = frameDescr;
    proto.constructor = closure;
    return closure;
  }
  S.regOpaqueObject(constr, `c#${info.module.name}#${info.name}`);
github awto / effectfuljs / packages / debugger / src / kit.js View on Github external
export function imports(value, name) {
  if (!value) return value;
  if (value[thunkSymbol]) {
    value = value();
    if (!value) return value;
  }
  if (!value[S.descriptorSymbol]) regModule(value, name);
  return value;
}