(thing: any)
| 7 | } |
| 8 | |
| 9 | function isTransferable(thing: any): thing is Transferable { |
| 10 | if (!thing || typeof thing !== "object") return false |
| 11 | // Don't check too thoroughly, since the list of transferable things in JS might grow over time |
| 12 | return true |
| 13 | } |
| 14 | |
| 15 | export function isTransferDescriptor(thing: any): thing is TransferDescriptor { |
| 16 | return thing && typeof thing === "object" && thing[$transferable] |