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

Make LocaleProvider return language instead of domain #736

Merged
merged 1 commit into from
Feb 27, 2025

Conversation

thomasdax98
Copy link
Member

@thomasdax98 thomasdax98 commented Feb 20, 2025

Demo: Part of PR: vivid-planet/comet#3451

Open questions

In Demo (TS v4) I typed scope explicitly:

<LocaleProvider resolveLocaleForScope={(scope: ContentScope) => scope.language}>

This doesn't work in the Starter (TS v5):

TS2322: Type (scope: ContentScope) => string is not assignable to type ResolveLocaleFunction
Types of parameters scope and scope are incompatible.
Type ContentScopeInterface is missing the following properties from type ContentScope: domain, language

Do we care? Any idea how I can make this work?

@johnnyomair
Copy link
Collaborator

We discussed this when we enabled TS Strict Mode: #314 (comment)

We'll probably need module augmentation for this.

@thomasdax98 thomasdax98 merged commit 8e5f55c into main Feb 27, 2025
3 checks passed
@thomasdax98 thomasdax98 deleted the fix-locale-provider branch February 27, 2025 13:34
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