Skip to content

encodeEnvelope

encodeEnvelope(codec, type, payload, id?): object

Defined in: packages/client/src/worker/protocol.ts:530

Build a wire envelope, running the payload through the codec. Returns the envelope + any transferables.

BridgeCodec

BridgeMessageType

unknown

string

object

envelope: BridgeEnvelope

optional transfer?: unknown[]