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
When using the "Infer parameter types from usage" quick fix in VS Code, TypeScript sometimes injects the JSDoc type annotation right in the middle of the code. The resulting code looks odd and broken.
TypeScript Version: 4.0.0-dev.20200607
Search Terms:
infer all from usage
Code
Using "Infer parameter type from usage" on this code:
When using the "Infer parameter types from usage" quick fix in VS Code, TypeScript sometimes injects the JSDoc type annotation right in the middle of the code. The resulting code looks odd and broken.
TypeScript Version: 4.0.0-dev.20200607
Search Terms:
infer all from usage
Code
Using "Infer parameter type from usage" on this code:
produces this output:
Expected behavior:
TypeScript produces annotated code that is not weirdly broken into different lines
Actual behavior:
TypeScript produces annotated code that looks odd and has the JSDoc comment injected in the middle of code
Playground Link: Not sure if this functionality is available in the Playground
Related Issues: N/A
The text was updated successfully, but these errors were encountered: