[typescript] Fix: any type (8 liner PR)#10080
Conversation
There was a problem hiding this comment.
Thanks @lwj5 !
I'm currently looking at the earlier fix for other TS generators that addresses the same problem: https://github.com/OpenAPITools/openapi-generator/pull/6335/files#diff-e07b04e9dd1e4acea6c1d994fd38512f06fa272ca70e4bca3e8d9126e74e5ca0R167
It looks like in addition to the type mapping, that PR also removes any from composite type, thus avoiding things like MyModel & any in common use cases (which in TS is the same as any - hence unnecessarily loosens types).
Any thoughts about doing the same here?
@amakhrov yes I noticed #6335 as well. When I opened the TS generator I saw that those changes were already there, only this line was missed out. |
|
p.s. checking again I realised |
amakhrov
left a comment
There was a problem hiding this comment.
Thanks!
It looks good to me.
Maybe also consider adding some tests?
|
Sure, done :) |
|
In the future we may consider extending TypeScriptClient class with |
1 line change to fix Anytype in TS client.
Regenerated all samples but no changes.
PR checklist
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*.For Windows users, please run the script in Git BASH.
master,5.3.x,6.0.x@TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @topce (2018/10) @akehir (2019/07) @petejohansonxo (2019/11) @amakhrov (2020/02)