Bug Report Checklist
Description
This is similar to issue #12948 but only happens when you use ES2022 as the target because there cause?: unknown has been added to Error in lib.es2022.error.d.ts
openapi-generator version
6.2.0
OpenAPI declaration file content or url
N/A
Generation Details
N/A
Steps to reproduce
diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/tsconfig.json b/samples/client/petstore/typescript-fetch/builds/es6-target/tsconfig.json
index 250280d9ab0..ec9f49f3844 100644
--- a/samples/client/petstore/typescript-fetch/builds/es6-target/tsconfig.json
+++ b/samples/client/petstore/typescript-fetch/builds/es6-target/tsconfig.json
@@ -5,6 +5,11 @@
"module": "commonjs",
"moduleResolution": "node",
"outDir": "dist",
+ "noImplicitOverride": true,
+ "lib": [
+ "es2022",
+ "dom"
+ ],
"typeRoots": [
"node_modules/@types"
]
src/runtime.ts:245:17 - error TS4115: This parameter property must have an 'override' modifier because it overrides a member in base class 'Error'.
245 constructor(public cause: Error, msg?: string) {
~~~~~~~~~~~~~~~~~~~
Found 1 error in src/runtime.ts:245
Related issues/PRs
Suggest a fix
As this problem only occurs with ES2022 I guess one would have to introduce a special switch to know what ES-Version the generated code needs to compile with.
Bug Report Checklist
Description
This is similar to issue #12948 but only happens when you use ES2022 as the target because there
cause?: unknownhas been added toErrorinlib.es2022.error.d.tsopenapi-generator version
6.2.0
OpenAPI declaration file content or url
N/A
Generation Details
N/A
Steps to reproduce
Related issues/PRs
Suggest a fix
As this problem only occurs with ES2022 I guess one would have to introduce a special switch to know what ES-Version the generated code needs to compile with.