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.
Parameters
Section titled “Parameters”payload
Section titled “payload”unknown
string
Returns
Section titled “Returns”object
envelope
Section titled “envelope”envelope:
BridgeEnvelope
transfer?
Section titled “transfer?”
optionaltransfer?:unknown[]