diff --git a/inputfiles/patches/html.kdl b/inputfiles/patches/html.kdl index ff4b3c1c1..3b7f707dd 100644 --- a/inputfiles/patches/html.kdl +++ b/inputfiles/patches/html.kdl @@ -23,3 +23,7 @@ interface NavigationPrecommitController exposed=Window { interface NavigationTransition { property committed exposed=Window } + +removals { + enum ValueType +} diff --git a/inputfiles/removedTypes.jsonc b/inputfiles/removedTypes.jsonc index 06cd05c7d..086219910 100644 --- a/inputfiles/removedTypes.jsonc +++ b/inputfiles/removedTypes.jsonc @@ -11,11 +11,6 @@ } } }, - "enums": { - "enum": { - "ValueType": null - } - }, "interfaces": { "interface": { "Clipboard": { diff --git a/src/build/patches.ts b/src/build/patches.ts index 0bf053af7..be6873777 100644 --- a/src/build/patches.ts +++ b/src/build/patches.ts @@ -89,7 +89,7 @@ function optionalNestedMember(prop: string, object: object, output: T) { * Converts parsed KDL Document nodes to match the [types](types.d.ts). */ function convertKDLNodes(nodes: Node[]): DeepPartial { - const enums: Record = {}; + const enums: Record> = {}; const mixin: Record> = {}; const interfaces: Record> = {}; const dictionary: Record> = {}; @@ -134,7 +134,7 @@ function convertKDLNodes(nodes: Node[]): DeepPartial { * @param node The enum node to handle. * @param enums The record of enums to update. */ -function handleEnum(node: Node): Enum { +function handleEnum(node: Node): Partial { const name = string(node.properties?.name || node.values[0]); const values: string[] = []; @@ -144,7 +144,7 @@ function handleEnum(node: Node): Enum { return { name, - value: values, + ...optionalNestedMember("value", values, values), ...optionalMember( "legacyNamespace", "string",