Re:Announcing TypeScript 2.2
by WorldMaker on Thursday February 23, 2017 @11:09AM
(#13714999)
«Another problem I ran into was using various packages that weren't typed, but I suppose I can solve that by 'allowing' implicitAny.»
You can keep noImplicitAny and any-type just specific packages that can't/won't be typed. The declaration is now as simple as:
declare module 'path/to/module-name'
Typescript will any type modules that you declare that way. You can also use star (*) and star-star wildcards in the module name.Oh, that's great! Is that a recent change? I remember circumvrenting my issues with 'declare module' but it was more involved than just one line.
Re:Announcing TypeScript 2.2
by WorldMaker on Thursday February 23, 2017 @12:16PM
(#13715613)
Yes, simpler module declaration is relatively recent to Typescript having arrived in Typescript 2.0 (released in September).
Honestly this is the main thing keeping me from using TypeScript. I've spent hours, maybe days trying to deal with the mess of Babel/webpack/TS combined with ES6 modules (necessary for tree shaking).
Another problem I ran into was using various packages that weren't typed, but I suppose I can solve that by 'allowing' implicitAny.
I'd really love some advice on this because I want to use TypeScript. It's just been a major headache so far because things are complicated enough with all the other moving parts (Babel presets, import vs require, better but still not well documented Webpack 2, etc.).