News for hackers. Stuff that matters.
Re:TypeScript at Google by TheAceOfHearts on Saturday September 01, 2018 @10:11PM (#17895118)
TypeScript was released in 2012, I wouldn't call a 4 year old tool an early release. And if you were already using Webpack picking it up was as easy as adding a loader.

IMO, using such early proposals isn't worth the risk in production. Especially for proposals that are so young that they haven't even settled on a clear spec as to its behavior, like the pipeline operator.

Re:TypeScript at Google by egeozcan on Sunday September 02, 2018 @03:31AM (#17896045)
Sorry this is self promotion but I think it's relevant if you need something like the pipe operator now: https://github.com/egeozcan/ppipe

It's also ironic that I couldn't write this in Typescript because I simply couldn't figure out how. These days when I use my helper, I just use any and cast the result. It sucks but until I figure out how to type proxies and use variadic generic type parameters (if and when these are supported) I don't have another solution.

Re:TypeScript at Google by leppr on Sunday September 02, 2018 @12:08PM (#17897454)
The "official" Typescript solution to variadic type parameters is to write a bunch of overloads covering the most frequent cases, e.g. from 1 to 5 parameters.
Re:TypeScript at Google by steadicat on Sunday September 02, 2018 @12:27PM (#17897513)
Re:TypeScript at Google by mpawelski on Sunday September 02, 2018 @05:26PM (#17898754)
no yet really. But it's good first step to have "true" variadic types support. Right now I think you still can't represent stuff like `Promise.all` without many numbers of overloads.
Re:TypeScript at Google by TulliusCicero on Sunday September 02, 2018 @07:16AM (#17896581)
> TypeScript was released in 2012, I wouldn't call a 4 year old tool an early release.

Goddamn time travelers, stop messing with chronology!

Re:TypeScript at Google by TeMPOraL on Sunday September 02, 2018 @08:40AM (#17896771)
4-year old by the time GGP found it "painful to use as any early release", which was 2 years ago.
Re:TypeScript at Google by mattferderer on Sunday September 02, 2018 @09:57AM (#17897000)
I could be slightly off on when I first used it by a year or two. Years start to blend together. It's almost 2019 already! Maybe I shouldn't have used exact numbers.

Either way it wasn't Typescript itself that made it difficult. There wasn't as large of community yet, documentation was much less, editor support wasn't as great and very few packages had type definition files. Definitely typed could show all or most of their packages on GitHub at the time and many were incomplete. That was the sole way to get any type definitions.

Agreed with your comment on early proposals. Still would like to have the option to use it and double check the transformation of how it outputs. And not everything needs to be for production use. Writing for fun is an enjoyable hobby.