News for hackers. Stuff that matters.
Re:TypeScript 1.4 sneak peek: union types, type guards, and ... by Horusiath on Wednesday November 19, 2014 @05:16PM (#8633024)
I actually like cleanliness of Javascript generated from Typescript code. However I don't think that pattern matching would be more intrusive than, for example, module or class generation. Basically example from above could be compiled down to something like:

    var x = getResults();
    if(x instanceof Error) { ... }
    else if(x instanceof Results) { ... }

There are no comments on this comment yet.