aboutsummaryrefslogtreecommitdiff
path: root/packages/bun-types/tests/broadcast.test-d.ts
blob: ea5f8cb054eec0bc0265a72c09b2c4101a570ee4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
const channel = new BroadcastChannel("my-channel");
const message = { hello: "world" };

channel.onmessage = event => {
  console.log(event.data); // { hello: "world" }
};
channel.postMessage(message);

const error = new Error("hello world");
const clone = structuredClone(error);
console.log(clone.message); // "hello world"
843fd0d8ef003650c1094214c0?s=13&d=retro' width='13' height='13' alt='Gravatar' /> wangao 2-5/+5 2022-04-18not sure yetGravatar Jarred Sumner 4-92/+107 2022-04-18fix wasm build take 2 (one more thing is broken)Gravatar Jarred Sumner 15-195/+641 2022-04-18Fix wasm buildGravatar Jarred Sumner 6-13/+58 2022-04-18[node] Add more fs constants (#144)Gravatar wangao 4-137/+201 2022-04-16Move some code around + delete dead codeGravatar Jarred Sumner 4-2113/+1889 2022-04-16[JS Parser] Support explicit removingGravatar Jarred Sumner 10-88/+480 2022-04-16Workaround C ABI bugGravatar Jarred Sumner 1-9/+12 2022-04-16[JS Parser] API for removing & replacing exportsGravatar Jarred Sumner 2-85/+495 2022-04-15Update README.mdGravatar Jarred Sumner 1-29/+0