# wireCopy() function · @imqueue/rpc

Source: https://imqueue.org/api/rpc/latest/rpc.wirecopy/
Published: 2026-11-12
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/rpc 3.11.0 — generated reference, not hand-written

Copies a value the way the queue does: through JSON and back.

**Signature:**

```typescript
export declare function wireCopy<T extends object>(value: T): T;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| value | T | an object to copy |


**Returns:**

T

the copy, which shares nothing with the value

## Remarks

This is what keeps an in-process call's semantics those of a queued one: a `Date` arrives as its ISO string, a class instance as a plain object, `undefined` properties are gone and `undefined` array items are `null`, and neither side can change an object the other still holds. It throws where the queue would fail to send, on a `BigInt` or a cycle.

