4 ms·
With node, at least you have the option to easily migrate to TypeScript and get excellent tooling.
by spion 11y ago
With node, at least you have the option to easily migrate to TypeScript and get excellent tooling.
- beders 11y agoif all the libraries you are using are as well...maybe.
- spion 11y agoYou can write definition files for libraries. A lot of libraries already have such files: https://github.com/borisyankov/DefinitelyTyped 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.
- popmystack 11y agoOr what if, hear me out, everyone just did that thing from the start?
- spion 11y agoI do tend to start all my new node projects in TypeScript, yes.
- Tarks 11y agoWith 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?
- maattdd 11y agoYou can do both.
- popmystack 11y agoSeems like a silly conundrum to be in.