(payload: T, transferables?: Transferable[])
| 54 | export function Transfer<T>(payload: T, transferables: Transferable[]): TransferDescriptor |
| 55 | |
| 56 | export 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 | } |
no test coverage detected