Are there any benefits of developing a Visual Studio Code extension in Typescript rather than JavaScript? I've been searching for a comparison of the two (pros, cons, differences, etc) but have not been able to find that.
Asked
Active
Viewed 822 times
4
-
3I don't think there are any specific benefits, at runtime it's all Javascript, the advatages are those that TS offers generally that stem from type safety: easier to discover an unfamiliar API, less changes of errors, etc – Titian Cernicova-Dragomir Feb 25 '18 at 17:18
1 Answers
5
I would definitley use typescript. VSCode was made in typescript and it would be a good idea to use the same language they use. The extension examples they offer are all in typescript. Other people's extensions like my own or wolf or react-native or power-mode are also in typescript. If you used javascript using other people's code would require converting it over which would be quite annoying.
And of course there are all the benefits typescript provides over javascript: fail-fast compilation, better intellisense, less errors, etc...
What is TypeScript and why would I use it in place of JavaScript?

Almenon
- 1,191
- 11
- 22