nuxt-modules / i18n

I18n module for Nuxt
https://i18n.nuxtjs.org
MIT License
1.65k stars 465 forks source link

Using defineI18nLocaleDetector, event.context.i18n?.locale could be async function instead of string #2954

Open DavidDeSloovere opened 1 month ago

DavidDeSloovere commented 1 month ago

Describe the feature

event.context.i18n?.locale is typed as string I use a custom defineI18nLocaleDetector, and the actual type of locale on the context is function (it's value is [Function: bound localeDetector] AsyncFunction)

Would it be possible to change the typing?

image

See also https://github.com/nuxt-modules/i18n/discussions/2010#discussioncomment-7829274

Additional information

Final checks