Is it possible to write on TypeScript under NodeJS? The question, is it a good practice?
Will I be able to use without any problems packages from npm, or some third-party scripts/classes are written in js?
If you understand what is needed .d.ts-files and how to use typings, you will have no problems.
fresh features from spec ES
- static typing, and, consequently, all the advantages that it provides. in a nutshell: part of the error will otlavlivatsya prior to the launch and thus need less testing
good language support all sorts of editors. IDE from Jetbrains would be better to give hints. And even simple code editors, e.g. Atom, Sublime, VS Code will issue the normal prompt, go to the definitions in the code to give the signature of methods, etc.
- You need to understand how to connect a simple js library to the project. In General, it is not difficult, but many do not master.
- The types "exist" only in compile-time. The output is normal JS with all its dynamic nature. If the code is written poorly (for example, often used the any type), then typescript will help.
And about the debugging I have already said: it is no problem. Just need to connect this thing
, and everything will be fine. VS Code definitely knows how to connect to motovskomu (and chromosome) and the debugger will jump at the source, not a compiled mess.