News for hackers. Stuff that matters.
Re:After a year of using Node.js in production by spion on Monday May 02, 2016 @07:12PM (#11616531)
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?
Re:After a year of using Node.js in production by spion on Monday May 02, 2016 @07:31PM (#11616657)
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.