---
url: 'https://adk.nht.io/api/@nhtio/adk/batteries/functions/transfer.md'
---

# Function: transfer()

```ts
function transfer<T>(value: T, transferables: unknown[]): T;
```

Defined in: [src/batteries/isolation/codec.ts:119](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/isolation/codec.ts#L119)

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](../type-aliases/WireValue.md) 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`
