byCedric/use-expo

Update to TypeScript 4.0

barthap opened this issue · 0 comments

Topic and scope of discussion

I think that the hooks would gain much from the latest TypeScript 4.0 - return type hints would be much more readable.

Motivation

TS 4.0 introduced new feature, especially useful for hooks - labeled tuple elements.

Additional context

Look at this screenshot (I omitted JSDoc comments for purpose):
Screenshot 2020-08-31 at 17 56 24

When looking at type hints in VS code, it's now clear what each tuple element is, even without JSDoc example 😀 And I suspect that in future the IntelliSense would be even better.

I can make a PR for this if it's desirable 😉