Skip to content
This repository was archived by the owner on Sep 27, 2023. It is now read-only.

Commit 56c2ad2

Browse files
thicodesalloy
authored andcommitted
Change concat to spread to fix array
1 parent 38927fa commit 56c2ad2

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/TypeScriptGenerator.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,9 +1065,7 @@ function getEnumDefinitions(
10651065
}
10661066

10671067
return enumNames.map(name => {
1068-
const values = [].concat(
1069-
schema.getEnumValues(usedEnums[name]) as any
1070-
) as any;
1068+
const values = [...schema.getEnumValues(usedEnums[name])];
10711069
values.sort();
10721070

10731071
if (!noFutureProofEnums) {
@@ -1077,7 +1075,6 @@ function getEnumDefinitions(
10771075
return exportType(
10781076
name,
10791077
ts.createUnionTypeNode(
1080-
// @ts-ignore
10811078
values.map(value => stringLiteralTypeAnnotation(value))
10821079
)
10831080
);

0 commit comments

Comments
 (0)