You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Typescript compiler does not understand the function exists() ensures the value is present. exists() simply assert the value is not null or undefined, so a quick fix will be using == operator like this.
Bug Report Checklist
Description
Given OpenAPI schema definition:
Then generated source file
Task.ts
has a compilation errorTS2532: Object is possibly undefined
. The TypeScript version is 5.3.3 (latest).openapi-generator version
At the current latest commit of the master branch (a8efb8e)
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
Related issues/PRs
This bug seems to have been introduced by #17798.
Suggest a fix
Typescript compiler does not understand the function
exists()
ensures the value is present.exists()
simply assert the value is not null or undefined, so a quick fix will be using==
operator like this.The text was updated successfully, but these errors were encountered: