the options to makeCapTP

interface CapTPOptions {
    epoch: undefined | number;
    exportHook: undefined | ((val: unknown, slot: string) => void);
    gcImports: undefined | boolean;
    importHook: undefined | ((val: unknown, slot: string) => void);
    makeCapTPImportExportTables: undefined | ((MakeCapTPImportExportTablesOptions: any) => CapTPImportExportTables);
    onReject: undefined | ((err: any) => void);
    trapGuest: undefined | TrapGuest;
    trapHost: undefined | TrapHost;
}

Properties

epoch: undefined | number

an integer tag to attach to all messages in order to assist in ignoring earlier defunct instance's messages

exportHook: undefined | ((val: unknown, slot: string) => void)
gcImports: undefined | boolean

if true, aggressively garbage collect imports

importHook: undefined | ((val: unknown, slot: string) => void)
makeCapTPImportExportTables: undefined | ((MakeCapTPImportExportTablesOptions: any) => CapTPImportExportTables)

provide external import/export tables

onReject: undefined | ((err: any) => void)
trapGuest: undefined | TrapGuest

if specified, enable this CapTP (guest) to use Trap(target) to block while the recipient (host) resolves and communicates the response to the message

trapHost: undefined | TrapHost

if specified, enable this CapTP (host) to serve objects marked with makeTrapHandler to synchronous clients (guests)