Skip to content

Docs: update way we import './messages/en.json' #1855

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Git-I985
Copy link

Replaced top level import with typeof import, to avoid problems with top level imports in d.ts.file https://www.typescriptlang.org/docs/handbook/2/modules.html?utm_source=chatgpt.com#:~:text=file%20without%20any%20top%2Dlevel%20import%20or%20export%20declarations

import en from './messages/en.json'; will almost turn off this global.d.ts file, better to use typeof import() as an example

Please update this post also https://next-intl.dev/blog/next-intl-4-0#revamped-augmented-types

Copy link

vercel bot commented Apr 21, 2025

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

Name Status Preview Comments Updated (UTC)
next-intl-example-app-router ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 21, 2025 10:29am
next-intl-example-app-router-without-i18n-routing ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 21, 2025 10:29am

Copy link

vercel bot commented Apr 21, 2025

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

A member of the Team first needs to authorize it.

@amannn
Copy link
Owner

amannn commented Apr 22, 2025

Hey, it seems like your branch is based on an outdated state of main:

image

With #1814, @remcohaszing switched global.d.ts to global.ts.

Does that avoid the issue you want to address here?

@amannn amannn mentioned this pull request Apr 22, 2025
@Git-I985
Copy link
Author

Git-I985 commented Apr 22, 2025

Does that avoid the issue you want to address here?

not exactly

Hey, it seems like your branch is based on an outdated state of main:

hm, so weird, sorry, i will check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants