Hacker News new | past | comments | ask | show | jobs | submit login

With node, at least you have the option to easily migrate to TypeScript and get excellent tooling.



if all the libraries you are using are as well...maybe.


You can write definition files for libraries. A lot of libraries already have such files: https://github.com/borisyankov/DefinitelyTyped

If a particular library doesn't have one, you can write it yourself. In that case theres no need to model the entire library - you can only model the subset of functions / methods that you use.


Or what if, hear me out, everyone just did that thing from the start?


I do tend to start all my new node projects in TypeScript, yes.


With TS do I have to have a spec for every third party code or can I import something and use it as-is, but not get the benefits of TS on that part of the code?


You can do both.


Seems like a silly conundrum to be in.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: