MCPcopy Index your code
hub / github.com/andywer/threads.js / Transfer

Function Transfer

src/transferable.ts:56–67  ·  view source on GitHub ↗
(payload: T, transferables?: Transferable[])

Source from the content-addressed store, hash-verified

54export function Transfer<T>(payload: T, transferables: Transferable[]): TransferDescriptor
55
56export function Transfer<T>(payload: T, transferables?: Transferable[]): TransferDescriptor {
57 if (!transferables) {
58 if (!isTransferable(payload)) throw Error()
59 transferables = [payload]
60 }
61
62 return {
63 [$transferable]: true,
64 send: payload,
65 transferables
66 }
67}

Callers 2

xorFunction · 0.85

Calls 1

isTransferableFunction · 0.85

Tested by

no test coverage detected