Re:After a year of using Node.js in production
by spion on Monday May 02, 2016 @07:01PM
(#11616446)
With node, at least you have the option to easily migrate to TypeScript and get excellent tooling.
[ Parent
| on HN ]
Re:After a year of using Node.js in production
by beders on Monday May 02, 2016 @07:08PM
(#11616498)
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.
Re:After a year of using Node.js in production
by popmystack on Monday May 02, 2016 @07:25PM
(#11616619)
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.
Re:After a year of using Node.js in production
by Tarks on Tuesday May 03, 2016 @04:28AM
(#11618856)
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?
Re:After a year of using Node.js in production
by maattdd on Tuesday May 03, 2016 @05:43AM
(#11619127)
You can do both.
Re:After a year of using Node.js in production
by popmystack on Tuesday May 03, 2016 @06:53PM
(#11624892)
Seems like a silly conundrum to be in.