4 ms·
You just have to declare which external module (3rd party dep) you are using so typescript knows how to apply typings. Ie you can use ES6 imports, you just nee
by Keats 11y ago
You just have to declare which external module (3rd party dep) you are using so typescript knows how to apply typings.
Ie you can use ES6 imports, you just need to have a /// <reference path="../typings/all.d.ts" /> line or declare them in tsconfig.json now (I believe, haven't checked yet).
I agree the modules are tricky and my least favourite thing about TS though
- pluma 11y agoEh. Those magical comments were what turned me off using TS to begin with. If I'm importing stuff, I'm already declaring my dependencies. TS seems to prefer re-inventing the wheel whereas flow just builds on what is already there. But that's just my (unfairly biased) impression. EDIT: Shame Flow is written in OCaml rather than built on Node. That's the only thing I prefer about TS at this point.