2 ms·
«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 noImplicitAn
by WorldMaker 10y ago
«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.
- mercer 10y agoOh, 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.
- WorldMaker 10y agoYes, simpler module declaration is relatively recent to Typescript having arrived in Typescript 2.0 (released in September).