Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions inputfiles/overridingTypes.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -347,12 +347,6 @@
},
"enums": {
"enum": {
"ImportExportKind": {
"legacyNamespace": "WebAssembly"
},
"TableKind": {
"legacyNamespace": "WebAssembly"
},
"ImageOrientation": {
"value": [
// The spec removed this but it's still in browsers and WebKit doesn't support the new one.
Expand Down
2 changes: 2 additions & 0 deletions inputfiles/patches/legacies.kdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
enum ImportExportKind legacyNamespace=WebAssembly
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

webassembly.kdl

enum TableKind legacyNamespace=WebAssembly
10 changes: 9 additions & 1 deletion src/build/patches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,15 @@ function handleEnum(node: Node): Enum {
values.push(child.name);
}

return { name, value: values };
return {
name,
value: values,
...optionalMember(
"legacyNamespace",
"string",
node.properties.legacyNamespace,
),
};
}

/**
Expand Down