by enriquecastl · 11y ago · 0 comments
They'll probably fix this issue sooner rather than later but in the meanwhile it's a critical issue.
declare var Chart: any;
atop your file, and you can use it the same way you would in JS: without type info. No need to create any type definitions.Or do you mean something different?
Are you talking about what's described here: https://github.com/Microsoft/TypeScript/issues/2242
I just did a small typescript prototype and used the import syntax there. It might have been your typescript version as 1.5 recently came out (and I was using the 1.5 beta 2).
The hardest part is what you described at the start. If it doesn't have a type definition it's hard. DefinitelyTyped helps a lot (https://github.com/DefinitelyTyped/tsd)
I had to create a type definition for something that wasn't there. It was annoying because I had to make the equivalent of a header file before I could use a library.