Good work Chris.
a. create a tsconfig.json file in the root of your project or monorepo, and add...
"allowJs": true /* Allow javascript files to be compiled. */, "checkJs": true /* Report errors in .js files. */,
and you won't ever need... // @ts-check
b. Type your data with JSDoc. Now you have all the Typescript services, while keeping your code pure JavaScript. The best of both worlds.
Example:
hey.. thanks.. yea that exist as well.. Just wanted to give people the "try before you buy experience". But you are right a config file is better.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Good work Chris.
Tip:
a.
create a tsconfig.json file in the root of your project or monorepo, and add...
and you won't ever need... // @ts-check
b.
Type your data with JSDoc.
Now you have all the Typescript services, while keeping your code pure JavaScript.
The best of both worlds.
Example:
hey.. thanks.. yea that exist as well.. Just wanted to give people the "try before you buy experience". But you are right a config file is better.