amannn / next-intl

🌐 Internationalization (i18n) for Next.js
https://next-intl-docs.vercel.app
MIT License
2.58k stars 236 forks source link

feat: Add type exports to enable `declaration: true` in `tsconfig.json` #1509

Closed osaton closed 1 week ago

osaton commented 1 week ago

Re: https://github.com/amannn/next-intl/discussions/1014

Fix the type issues encountered when re-exporting types in a client application with compilerOptions.declaration set to true. This change addresses errors such as:

The inferred type of 'Link' cannot be named without a reference to '../node_modules/next-intl/dist/types/src/shared/types'. This is likely not portable. A type annotation is necessary.ts(2742)

vercel[bot] commented 1 week ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-intl-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 8, 2024 9:53am
next-intl-example-app-router ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 8, 2024 9:53am
next-intl-example-app-router-without-i18n-routing ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 8, 2024 9:53am
vercel[bot] commented 1 week ago

@osaton is attempting to deploy a commit to the next-intl Team on Vercel.

A member of the Team first needs to authorize it.