Function: transfer()
ts
function transfer<T>(value: T, transferables: unknown[]): T;Defined in: src/batteries/isolation/codec.ts:119
Mark value for transfer (rather than clone) across a postMessage-based transport — WP2's browser transport unwraps this into the message's transfer list. The codec passes marked values through as raw with transferables preserved on the WireValue envelope's transfer field. Node transports (WP3) ignore the marker entirely (structured-clone/pipe semantics don't have a transfer list), so transfer() is safe to use in transport-agnostic code that may run over either.
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
value | T |
transferables | unknown[] |
Returns
T