Not portable types
#1014
-
When using various functions, we instantiate variables that do not seem to have a portable inferred type. For example: export const { Link, redirect, usePathname, useRouter } =
createSharedPathnamesNavigation({
locales,
localePrefix,
}); results in
Similarly, const requestConfig = getRequestConfig(
async ({ locale }) => { ... }
); results in
For the latter, I seem to be able to get rid of it by typing it as Do the |
Beta Was this translation helpful? Give feedback.
Answered by
amannn
May 10, 2024
Replies: 1 comment 10 replies
-
Can you share your |
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've isolated the issue to
"declaration": true
. If you remove that, the error should be gone. Note that this option isn't set by default in a new Next.js app.If there's anything that
next-intl
can do to be more compatible with this config option I'd generally be open to discuss, but as far as I understand, this setting is rather intended to be used in libraries rather than apps.Hope this helps!