Skip to content

Commit 02c31bf

Browse files
authored
Add 'constructor' to reserved words (#13725)
1 parent 31ea76b commit 02c31bf

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docs/generators/typescript.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
8787
<li>char</li>
8888
<li>class</li>
8989
<li>const</li>
90+
<li>constructor</li>
9091
<li>continue</li>
9192
<li>debugger</li>
9293
<li>default</li>

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptClientCodegen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public TypeScriptClientCodegen() {
125125
"varLocalPath", "queryParameters", "headerParams", "formParams", "useFormData", "varLocalDeferred",
126126
"requestOptions", "from",
127127
// Typescript reserved words
128-
"abstract", "await", "boolean", "break", "byte", "case", "catch", "char", "class", "const", "continue", "debugger", "default", "delete", "do", "double", "else", "enum", "export", "extends", "false", "final", "finally", "float", "for", "function", "goto", "if", "implements", "import", "in", "instanceof", "int", "interface", "let", "long", "native", "new", "null", "package", "private", "protected", "public", "return", "short", "static", "super", "switch", "synchronized", "this", "throw", "transient", "true", "try", "typeof", "var", "void", "volatile", "while", "with", "yield"));
128+
"abstract", "await", "boolean", "break", "byte", "case", "catch", "char", "class", "const", "constructor", "continue", "debugger", "default", "delete", "do", "double", "else", "enum", "export", "extends", "false", "final", "finally", "float", "for", "function", "goto", "if", "implements", "import", "in", "instanceof", "int", "interface", "let", "long", "native", "new", "null", "package", "private", "protected", "public", "return", "short", "static", "super", "switch", "synchronized", "this", "throw", "transient", "true", "try", "typeof", "var", "void", "volatile", "while", "with", "yield"));
129129

130130
languageSpecificPrimitives = new HashSet<>(Arrays.asList(
131131
"string",

0 commit comments

Comments
 (0)