aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/scripts
diff options
context:
space:
mode:
authorGravatar Dylan Conway <35280289+dylan-conway@users.noreply.github.com> 2023-07-28 16:44:28 -0700
committerGravatar GitHub <noreply@github.com> 2023-07-28 16:44:28 -0700
commitd614fdfaac13346d71ecf24712abaefe8224687d (patch)
tree2fce0943c663db984755df123d96d788984cad22 /src/bun.js/scripts
parent0a4e476a7c08005e242ed48f3f27895e55deacc9 (diff)
downloadbun-d614fdfaac13346d71ecf24712abaefe8224687d.tar.gz
bun-d614fdfaac13346d71ecf24712abaefe8224687d.tar.zst
bun-d614fdfaac13346d71ecf24712abaefe8224687d.zip
`MessageChannel` and `MessagePort` (#3860)
* copy and format * copy * copy * cleanup * some tests * spellcheck * add types * don't lock getting contextId * array buffer test
Diffstat (limited to 'src/bun.js/scripts')
-rw-r--r--src/bun.js/scripts/class-definitions.ts2
-rw-r--r--src/bun.js/scripts/generate-classes.ts6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/bun.js/scripts/class-definitions.ts b/src/bun.js/scripts/class-definitions.ts
index 281cd62c5..d9c327f6b 100644
--- a/src/bun.js/scripts/class-definitions.ts
+++ b/src/bun.js/scripts/class-definitions.ts
@@ -41,7 +41,7 @@ export interface ClassDefinition {
configurable?: boolean;
enumerable?: boolean;
- structuredClone?: boolean | { transferrable: boolean; tag: number };
+ structuredClone?: boolean | { transferable: boolean; tag: number };
}
export interface CustomField {
diff --git a/src/bun.js/scripts/generate-classes.ts b/src/bun.js/scripts/generate-classes.ts
index fb4419642..ec0021637 100644
--- a/src/bun.js/scripts/generate-classes.ts
+++ b/src/bun.js/scripts/generate-classes.ts
@@ -1249,7 +1249,7 @@ function generateZig(
if (structuredClone) {
exports.set("onStructuredCloneSerialize", symbolName(typeName, "onStructuredCloneSerialize"));
- if (structuredClone === "transferrable") {
+ if (structuredClone === "transferable") {
exports.set("onStructuredCloneTransfer", symbolName(typeName, "onStructuredCloneTransfer"));
}
@@ -1306,8 +1306,8 @@ function generateZig(
}
`;
- if (structuredClone === "transferrable") {
- exports.set("structuredClone", symbolName(typeName, "onTransferrableStructuredClone"));
+ if (structuredClone === "transferable") {
+ exports.set("structuredClone", symbolName(typeName, "onTransferableStructuredClone"));
output += `
if (@TypeOf(${typeName}.onStructuredCloneTransfer) != (fn(*${typeName}, globalThis: *JSC.JSGlobalObject, ctx: *anyopaque, write: *const fn(*anyopaque, ptr: [*]const u8, len: usize) callconv(.C) void) callconv(.C) void)) {
@compileLog("${typeName}.onStructuredCloneTransfer is not a structured clone transfer function");