by skimdesk · 3y ago · 0 comments
Writing
// @ts-check
/** @type {number} */
let x;
works very well for example in VSCode. The JSDoc comments are not as convenient as Typescript, but otherwise the experience is almost the same. The language server correctly keeps track of the types for me.[0]: https://www.typescriptlang.org/docs/handbook/intro-to-js-ts.... [1]: https://jsdoc.app/
No comments yet.