by agd · 11y ago · 0 comments
- it didn't easily integrate with existing JS code/libraries
- small community
- low resources (compiler bugs existed and weren't quickly fixed)
The community was a dealbreaker really. Lots of JS libraries already have TS type definitions so it's easy to get started, and TS keeps up-to-date with new JS features.
I prefered the Haxe typesystem, but it didn't really make business sense to keep using it.
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.
it doesn't really, you basically need to write definitions files too with Haxe, just like Typescript. Or you loose 'type-safety', just like TS.
TS is off course closer to Javascript.
In the latter case, Typescript gives you some typing for free whereas Haxe doesn't.