Take your TypeScript game to the next level using VSCode and these tips

If you’ve ever used a strongly typed language such as JAVA with such a powerhouse of an IDE like Eclipse, and then went on to try JavaScript, you would be very disappointed.

Not because of the language itself, mind you, I would rather code in JavaScript over JAVA any day of the week. However, the features Eclipse indeed provides developers are mostly based on the fact that JAVA has types and other constructs that help identify different structures (such as typed variables, classes, interfaces, abstract classes and the list goes on).

JavaScript on the other hand, is not strongly typed (as you probably already know), and thus, a variable declared as Number can just as easily be assigned a String . How can you expect then for your IDE to do any kind of IntelliSense? It can’t.

That’s where TypeScript comes into play. One of the many implicit benefits of using TypeScript over JS is that you give your IDE the power to actually be of use. It can stop being a glorified version of Notepad and can turn into a very useful software development tool.

So here are some tips you can use when coding with VSCode and TypeScript.

  • Creating your own custom snippets
  • You can customize the way VSCode formats your TypeScript
  • Easy refactor
  • Automatic actions after saving a file
  • CodeLens counters
  • Recommended TypeScript extensions

#typescript #vscode #javascript #web-development #developer

Tips for Coding TypeScript with VSCode
2.20 GEEK