If I write in plain JavaScript, I know I can currently place a sibling .d.ts
file next to my .js
file in order to type it for use in TypeScript.
Is it possible to write only a .js
file and place the declarations in there instead of having separate .d.ts
files?
I know currently we can write jsdoc-style comments, and get some typing, but it's fairly limited compared to actual TypeScript. I'd love to write normal declarations inside the .js
files.