Hacker News new | ask | show | jobs
by a_humean 2845 days ago
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...

1 comments

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...