API reference › @evolu/common › Worker › TestSharedWorker
Defined in: packages/common/src/Worker.ts:312
Test SharedWorker with direct access to self and connect.
Call connect() to simulate a client connection and trigger
self.onConnect.
Extends
SharedWorker<Input,Output>
Methods
[dispose]()
dispose: void;
Defined in: node_modules/.bun/typescript@5.9.3/node_modules/typescript/lib/lib.esnext.disposable.d.ts:36
Inherited from
Properties
connect
readonly connect: () => void;
Defined in: packages/common/src/Worker.ts:317
port
readonly port: MessagePort<Input, Output>;
Defined in: packages/common/src/Worker.ts:32
Port for communicating with the shared worker.
Inherited from
self
readonly self: SharedWorkerSelf<Input, Output>;
Defined in: packages/common/src/Worker.ts:316