t.rich
return type has become wrong when using it in Next v15 projects together with the new React v19 types
#1440
Labels
Description
After attempting to migrate to Next v15 I noticed a false positive during linting causing linting to fail and I narrowed it down to
t.rich
behaving differently in terms of types. Without looking into the implementation details it feels like thatt.rich
relies on some React specific types that were changed in v19.Verifications
Mandatory reproduction URL
https://github.com/ChristianIvicevic/next-intl-bug-repro-app-router/tree/next-15
Reproduction description
Steps to reproduce:
next-15
branch (that is the result of applying the codemod from Next v15 onto themain
branch of the reproduction, refer to the commit)app/[locale]/page.tsx
in your editort.rich
returnsany
Expected behaviour
In the
main
branch of the same reproduction you will notice howt.rich
is correctly typed and returnsstring | ReactElement | ReactNodeArray
as expected. It beingany
in the reproduction causes eslint to complain with theno-unsafe-return
error.The text was updated successfully, but these errors were encountered: