Use constructor instead of ad-hoc objects for various `Ref`s

This commit is contained in:
Tony Garnock-Jones 2024-03-28 12:40:25 +01:00
parent 90aa9656ca
commit 85b2299061
2 changed files with 4 additions and 5 deletions

View File

@ -223,7 +223,7 @@ export class Facet {
const h = nextHandle++; const h = nextHandle++;
const e = { const e = {
handle: h, handle: h,
peer: { relay: other, target: new StopOnRetract() }, peer: new Ref(other, new StopOnRetract()),
crossSpace: null, crossSpace: null,
established: true, established: true,
}; };

View File

@ -55,10 +55,9 @@ export class Membrane {
} }
} }
export const INERT_REF: Ref = { export const INERT_REF = new Ref(
relay: Actor.boot(() => Turn.active.stop(Turn.activeFacet)).root, Actor.boot(() => Turn.active.stop(Turn.activeFacet)).root,
target: {}, {});
};
export interface ProxyInbound { export interface ProxyInbound {
proxyPacket(packet: IO.Packet<Embedded<WireRef>>): void; proxyPacket(packet: IO.Packet<Embedded<WireRef>>): void;