3 ms·
I wish TS would consider the annotation-in-comments form from flow: https://flow.org/blog/2015/02/20/Flow-Comments/ https://flow.org/blog/2015/02/20/Flow-Commen
by sheetjs 9y ago
I wish TS would consider the annotation-in-comments form from flow: https://flow.org/blog/2015/02/20/Flow-Comments/ https://flow.org/blog/2015/02/20/Flow-Comments/
For switching a large existing JS codebase, it's easy to add flow comments without changing the final minified builds, allowing you to reap the full benefits of the type check.
- mohamedhegazy 9y agoTypeScript allows for JSDoc Comments for types in .js files with `--allowJs`. you do not need to change your code for that. See https://github.com/Microsoft/TypeScript/wiki/JSDoc-support-in-JavaScript https://github.com/Microsoft/TypeScript/wiki/JSDoc-support-i...
- yathern 9y agoThank you! I've been trying to figure out how to get JSDoc-ed code to get appropriately typed in Visual Studio Code with Typescript files as well.