import { fnType, getListType } from "../type_registry.js"; import {Type, Function} from "../metacircular.js"; import { Byte } from "../primitives/symbols.js"; export const Serializable = Symbol('Serializable'); const ListOfByte = getListType(Byte); const serializeFnType = fnType({in: Serializable, out: ListOfByte}); const deserializeFnType = fnType({in: ListOfByte, out: Serializable}); export const ModuleSerializable = [ {i: Serializable , t: Type}, {i: serializeFnType , t: Function}, {i: deserializeFnType, t: Function}, ];