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

Starlight overrides the defaultNS type definition of i18next so it conflicts with other i18next type definitions. #2742

Open
1 task done
lhr0909 opened this issue Dec 28, 2024 · 1 comment

Comments

@lhr0909
Copy link

lhr0909 commented Dec 28, 2024

What version of starlight are you using?

0.30.0

What version of astro are you using?

5.1.1

What package manager are you using?

pnpm

What operating system are you using?

Mac

What browser are you using?

Chrome

Describe the Bug

I was integrating i18next into my Astro site with Starlight and found that the TypeScript compiler will force the defaultNS field for any i18next instance to be 'starlight', which will make the t function type errors if the keys don't match.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-ytqftcmh?file=src%2Fpages%2Ftest.astro

Participation

  • I am willing to submit a pull request for this issue.
@lhr0909
Copy link
Author

lhr0909 commented Dec 28, 2024

Seems like stackblitz doesn't have type checking, but this is what I have on my IDE:

CleanShot 2024-12-29 at 00 02 51

the T function's Namespace field is forced to be 'starlight'

CleanShot 2024-12-29 at 00 01 57

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

No branches or pull requests

1 participant