Skip to content

Promise<ReactNode> return type annotation not working with react 19 types #67365

Answered by eps1lon
stefanprobst asked this question in Help
Discussion options

You must be logged in to vote

when using Promise<Awaited> instead of Promise it seems to work

This is currently the only workaround. Either microsoft/TypeScript#59111 gets addressed or we fix it at the @types/react level. It's a bit more involved to fix it before React 19 is stable so I'm not going to pursue it until then. Others are free to contribute. I added tests as a starting point: DefinitelyTyped/DefinitelyTyped#69970

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@stefanprobst
Comment options

Answer selected by stefanprobst
Comment options

You must be logged in to vote
2 replies
@Netail
Comment options

@booi-dev
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
5 participants