(message: unknown)
| 17 | }; |
| 18 | |
| 19 | export function packMessage(message: unknown): TransferringContainer { |
| 20 | return { |
| 21 | __STRUCTURED_CLONE_SERIALIZED__: true, |
| 22 | /** |
| 23 | * Use the `json: true` option to avoid errors |
| 24 | * caused by `function` or `symbol` types. |
| 25 | * It's not ideal to lose `function` and `symbol` types, |
| 26 | * but reliability is more important. |
| 27 | */ |
| 28 | data: serialize(message, {json: true}), |
| 29 | }; |
| 30 | } |
| 31 | |
| 32 | function isTransferringContainer( |
| 33 | message: unknown, |
no test coverage detected