News for hackers. Stuff that matters.
Re:TypeScript at Google by Alexendoo on Sunday September 02, 2018 @06:53AM (#17896523)
For the default props side of things, as of typescript 3 and the latest @types/react it should work as you would expect:

https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in...

Re:TypeScript at Google by a_humean on Sunday September 02, 2018 @08:22AM (#17896731)
I saw that for default props, but can I use it yet?

The React typescript definitions are still on 2.8 [1], and I imagine that they plan to stick with 2.8 until maybe the next major react release? I have no idea where people discuss things like react types for DefinitelyTyped. Github issues seem like a mess due to the sheer number of different projects sitting in a single repo.

[1] https://github.com/DefinitelyTyped/DefinitelyTyped/blob/1d96...

Re:TypeScript at Google by Alexendoo on Sunday September 02, 2018 @09:30AM (#17896933)
Yeah you should be able to, the minimum typescript version required and the one they test at is 2.8 for now but the LibraryManagedAttributes type is present [1]. On 2.8 and 2.9 it has no effect but if you're using 3.0 you should see it working.

[1] https://github.com/DefinitelyTyped/DefinitelyTyped/blob/1d96...