How to use the @effectful/serialization.NotSerializableDescriptor 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 / timeTravel / main.ts View on Github external
configurable: true,
        set(value) {
          Core.record(new PropSnapshot(this, propName, this[sym], value));
          this[sym] = value;
        },
        get() {
          return this[sym];
        }
      });
    },
    get() {}
  });
}

if (config.persistTimeTravel) S.regConstructor(Core.TraceData);
else S.regConstructor(Core.TraceData, S.NotSerializableDescriptor);
github awto / effectfuljs / packages / debugger / src / main.js View on Github external
import * as S from "@effectful/serialization";
import * as Kit from "./kit.js";
Kit.regModule(Kit, "@effectful/debugger/kit");
export * from "./kit.js";
export * from "./trace.js";
import * as RT from "./instr/rt.js";
import * as Trace from "./trace.js";
Trace.TraceData.prototype[S.descriptorSymbol] = S.NotSerializableDescriptor;
Kit.regModule(RT, "@effectful/debugger/rt");
Kit.regModule(Trace, "@effectful/debugger/trace");
for (const i of Object.values(RT)) {
  const meta = i && i[Kit.metaDataSymbol];
  if (meta) meta.canSkip = true;
}
export const exports = RT.exports;
export const imports = RT.imports;
export const chainM = RT.chainM;
export const Serialization = S;
S.regOpaquePrim(Kit.metaDataSymbol, "@effectful/debugger/metaData");
S.regOpaquePrim(Kit.thunkSymbol, "@effectful/debugger/thunk");
S.regOpaqueObject(Symbol.for, "Symbol.for");
S.regOpaqueObject(Symbol.keyFor, "Symbol.keyFor");
S.regOpaquePrim(Symbol.iterator, "SymbolStatic.iterator");
S.regOpaquePrim(Symbol.asyncIterator, "SymbolStatic.asyncIterator");