I've been programming for a long time and TypeScript has been a slam dunk for me. It makes programming large web apps actually considerably more manageable.<p>Unfortunately I spend a lot of time defending the merits of static typing to my co-workers. At the same time they're going on about how unit tests are important, while static typing eliminates entire classes of errors and they don't get it for some reason. Unit tests while important don't prevent type errors, and if you tried using them for that you'd have orders of magnitude more tests to write.<p>I feel like I'm taking crazy pills having to defend static typing while every dynamic language I've used for any project of any considerable size has been a complete nightmare to manage. At this point I feel like a lot of new coders coming out of school just haven't written anything large enough yet and maybe that's why they don't see the point.
I wanted to use TypeScript with a new React project, but the biggest problem I had (which eventually lead me away from using it) was that typings were so hard to get ahold of. Built something in JS? Sorry, you have to provide what is essentially a source map in order to get it to work with TypeScript. That should be a non-starter for anyone who is doing more than a hello world app. Figure out a way for me to use TS without having to create a bunch of extra type garbage in my app and I'll upgrade my code base immediately.
Question for TypeScript and specifically Angular 2: does Angular 2 being written in TypeScript mean that webapps based on Angular 2 that are also written in TypeScript, are basically 100% type-safe (e.g. all app-to-Angular library calls, or within-app view-to-model/etc. calls, are all type checked)?<p>I ask because after looking (admittedly very briefly) at writing an Ember app in TypeScript, it looked like because Ember assumes all of it's webapps will be JavaScript, there ends up being a lot of dynamic-/string-based idioms, e.g. model.set("property").<p>(There is a good SO post about turning this into a typed model.property.set(...) in TypeScript, but that solves just this one instance, and not the entire Ember experience.)<p>So, this left me with the feeling that for a TypeScript webapp to have a truly great/first-class/typed interaction with it's framework (Angular, Ember, whatever), that the framework itself would have to: a) be written in TypeScript, and b) have the founding assumption that most (all?) apps written for it would also be TypeScript.<p>So, per this post, Angular 2 is a), it's written in TypeScript. What about b)?
If you're looking for Typescript type definitions for a project you're using check this list - <a href="https://github.com/DefinitelyTyped/DefinitelyTyped" rel="nofollow">https://github.com/DefinitelyTyped/DefinitelyTyped</a>
<p><pre><code> There are a lot of options available to frontend devs
today: ES5, ES6 (Babel), TypeScript, Dart, PureScript,
Elm, etc.. So why TypeScript?'
</code></pre>
...<p><pre><code> Elm and PureScript are elegant languages with powerful
type systems that can prove a lot more about your program
than TypeScript can...
</code></pre>
ouch. Thats got to be a tiny bit awkward for the Dart team to read (so, I guess Dart isnt in the list of elegant languages then?)
It continues to be amazing to me that a new generation of developers is discovering that, yes, static checking adds a lot of value (for non-trivial-sized projects). Of course, if you were tasked with delivering web apps -- until recently -- you didn't really have any choice.<p>The older I get, the more the whole "everything moves in cycles" thing appears to be true -- almost regardless of what particular subject matter is under consideration.
So far I'm really into typescript (for dev). However i one big problem which is C.I. It's annoying to have to configure an environment just to run a TS compile job.