We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38927fa commit 56c2ad2Copy full SHA for 56c2ad2
src/TypeScriptGenerator.ts
@@ -1065,9 +1065,7 @@ function getEnumDefinitions(
1065
}
1066
1067
return enumNames.map(name => {
1068
- const values = [].concat(
1069
- schema.getEnumValues(usedEnums[name]) as any
1070
- ) as any;
+ const values = [...schema.getEnumValues(usedEnums[name])];
1071
values.sort();
1072
1073
if (!noFutureProofEnums) {
@@ -1077,7 +1075,6 @@ function getEnumDefinitions(
1077
1075
return exportType(
1078
1076
name,
1079
ts.createUnionTypeNode(
1080
- // @ts-ignore
1081
values.map(value => stringLiteralTypeAnnotation(value))
1082
)
1083
);
0 commit comments