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
basePath is type of string|string[] and basePath[0] could be undefined. This is in a way a compiler weakness rather than an error, because the length of the array is checked beforehand, whose data type is string[].
Bug Report Checklist
Description
If
noUncheckedIndexedAccess
is set totrue
intsconfig.json
, the embedded openapi generated code doesn't compile.basePath
is type ofstring|string[]
andbasePath[0]
could beundefined
. This is in a way a compiler weakness rather than an error, because the length of the array is checked beforehand, whose data type isstring[]
.openapi-generator version
7.2.0
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
Related issues/PRs
Suggest a fix
openapi-generator/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache
Line 75 in 7b0f963
could be set to
basePath = basePath[0]!;
The text was updated successfully, but these errors were encountered: