grandsilence / swagger-typescript-api-nextgen

Fork of TypeScript API generator via Swagger scheme (next generation).
MIT License
13 stars 3 forks source link

always specify return-type of api-calls #5

Open MaZderMind opened 2 years ago

MaZderMind commented 2 years ago

currently, the response-type of the data-attribute of the response of an api-call has to be deduced by following the lambda to the parametrized request function and evaluating it return type. This confuses the JetBrains (ie. IntelliJ / WebStorm) language server and it can't deduce the return-type of an await or then-statement correctly. I'm not sure if the VSCode language server handles this better, but I would expect it to have similar problems.

By specifying the return-type explicitly, the language-servers can easily deduce the type of the response.