4 ms·
TypeScript 2 adds Easier Module Declarations[0]. So if a library doesn't have a type definition, you can silence errors by adding: declare module "some-mod
by kfinley 10y ago
TypeScript 2 adds Easier Module Declarations[0]. So if a library doesn't have a type definition, you can silence errors by adding:
declare module "some-module"
Does that help?
0: https://blogs.msdn.microsoft.com/typescript/2016/07/11/announcing-typescript-2-0-beta/ https://blogs.msdn.microsoft.com/typescript/2016/07/11/annou...
- iLoch 10y agoYes that does actually. My experience may have been with an earlier version of TypeScript. I haven't looked at it in a few months.
- k_bx 10y agoTypeScript 2 milestone on github shows it's pretty far from a release (imho). I liked Facebook's Flow language more, but it seems to be less popular.
- ctolkien 10y agoV2 is currently in beta. > In the coming weeks, a more stable release candidate will be coming out, with the final product landing not too far after. -- https://blogs.msdn.microsoft.com/typescript/2016/07/11/announcing-typescript-2-0-beta/ https://blogs.msdn.microsoft.com/typescript/2016/07/11/annou...
- k_bx 10y agoGithub says "40% complete" in a milestone, that's where I got the impression from https://i.imgur.com/DQoyGeW.png https://i.imgur.com/DQoyGeW.png .
- k__ 10y agoreally? I have the complete opposite feeling, when looking into the TS2 repo.
- k_bx 10y agoMy feeling comes from "40% complete" on a milestone, where did you look at? https://i.imgur.com/DQoyGeW.png https://i.imgur.com/DQoyGeW.png