Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typing of return value of the withNextIntl function #485

Closed
boris-arkenaar opened this issue Aug 29, 2023 · 4 comments
Closed

Typing of return value of the withNextIntl function #485

boris-arkenaar opened this issue Aug 29, 2023 · 4 comments
Labels
enhancement New feature or request unconfirmed Needs triage.

Comments

@boris-arkenaar
Copy link
Contributor

Is your feature request related to a problem? Please describe.

I have type checking on my next.config.js and I'm using composePlugins from @nx/next.
On composePlugins I get a ts error telling me

    Type '(config: NextConfig) => unknown' is not assignable to type 'NextPlugin'.
      Type 'unknown' is not assignable to type 'NextConfig'.

This is referring to withNextIntl which has apparently a typing of (config: NextConfig) => unknown.

Describe the solution you'd like

Provide a typing of NextConfig for the return value of the withNextIntl function.

Describe alternatives you've considered

Ignore TS errors with

// @ts-ignore

This ignores type checking on all my plugins.

@boris-arkenaar boris-arkenaar added enhancement New feature or request unconfirmed Needs triage. labels Aug 29, 2023
@amannn
Copy link
Owner

amannn commented Aug 29, 2023

Thank you for another great bug report! This is fixed in [email protected], I hope it works correctly in your setup!

@amannn amannn closed this as completed Aug 29, 2023
@boris-arkenaar
Copy link
Contributor Author

Ah, it was fixed already? Great, thanks. I'll try it out!

@boris-arkenaar
Copy link
Contributor Author

Where can I keep track of the beta releases?

@amannn
Copy link
Owner

amannn commented Aug 29, 2023

New features are announced in #149 and bug fixes are mentioned in the issues that reference them, where typically the affected users are subscribed. The latest published version is always referenced here: https://next-intl-docs.vercel.app/docs/getting-started/app-router-server-components#current-beta-version

The release process for beta versions is currently a bit manual. The stable releases are easier to keep track of, I hope that the beta period will end in the foreseeable future so the releases are a bit more transparent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request unconfirmed Needs triage.
Projects
None yet
Development

No branches or pull requests

2 participants