diff --git a/inputfiles/addedTypes.jsonc b/inputfiles/addedTypes.jsonc index 4ab6d5991..be3ed4cce 100644 --- a/inputfiles/addedTypes.jsonc +++ b/inputfiles/addedTypes.jsonc @@ -48,9 +48,6 @@ "optional" ] }, - "ClientType": { - "name": "ClientTypes" - }, "RTCStatsIceCandidatePairState": { "value": [ "inprogress" diff --git a/inputfiles/patches/type-rename.kdl b/inputfiles/patches/type-rename.kdl new file mode 100644 index 000000000..a69effab9 --- /dev/null +++ b/inputfiles/patches/type-rename.kdl @@ -0,0 +1 @@ +enum ClientType name=ClientTypes diff --git a/src/build/patches.ts b/src/build/patches.ts index 50a105a95..f4ebc6dff 100644 --- a/src/build/patches.ts +++ b/src/build/patches.ts @@ -48,7 +48,7 @@ function parseKDL(kdlText: string): DeepPartial { * @param enums The record of enums to update. */ function handleEnum(node: Node): Enum { - const name = node.values[0]; + const name = node.properties?.name || node.values[0]; if (typeof name !== "string") { throw new Error("Missing enum name"); }