--
You received this message because you are subscribed to the Google Groups "friam" group.
To unsubscribe from this group and stop receiving emails from it, send an email to friam+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/friam/CANpA1Z0FL1GGtQbj710yCATpkqY5dB0Ov1R7S%3D5YMcY-mV%2BbtQ%40mail.gmail.com.
Someone suggested installing a TypeScript plugin to VSCode to get better JavaScript error reporting. I just looked, and there are a gazillion TypeScript plugins. Which one should I use?
jsconfig.json
file in the root of your project if it doesn't already exist.jsconfig.json
file, set "checkJs": true
inside the "compilerOptions"
object. Here's an example:--
You received this message because you are subscribed to the Google Groups "friam" group.
To unsubscribe from this group and stop receiving emails from it, send an email to friam+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/friam/CAD2YivbgKxZ3yNBbVb0nmnPR3QbYtAYx84SgY%2B1iEkmQOUwbkA%40mail.gmail.com.
(er, and would plain old js even get any benefit from ts? since there are no type annotations?)
--
You received this message because you are subscribed to the Google Groups "friam" group.
To unsubscribe from this group and stop receiving emails from it, send an email to friam+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/friam/CAJ7XQb5ig89YU%3DJ_CUx0aeTNaGH8-ZVHp6zyTyQUwVrwM43sZw%40mail.gmail.com.
I think the relevant plug-in is built-in.
I suggest taking a look at https://www.typescriptlang.org/docs/handbook/intro-to-js-ts.html
--
You received this message because you are subscribed to the Google Groups "friam" group.
To unsubscribe from this group and stop receiving emails from it, send an email to friam+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/friam/CAD2YivbgKxZ3yNBbVb0nmnPR3QbYtAYx84SgY%2B1iEkmQOUwbkA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/friam/CANpA1Z0Ge1w-0ktuR7%2B-9tw%2BPpoxp1GaqODwSAESvDc%3DWPqVyw%40mail.gmail.com.
TypeScript support is built in.
I think the question for you would be how do you get your Javascript file to be treated with TypeScript strictness, since VSCode uses the filename extension to determine which type checking to apply.
According to copilot, below is how to do it. Not tested by myself.
Kurt
The first entry the list of a gazillion TypeScript plugins should be the one from Microsoft. That’s the one you want.
If you want to be writing high quality JavaScript, you should be using JSLint.