Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

«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.


Yes, simpler module declaration is relatively recent to Typescript having arrived in Typescript 2.0 (released in September).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: