TS18046: $i18n is of type unknown (Nuxt 3.8 => 3.11.2)
IDE is giving me error "TS18046: $i18n is of type unknown " when I use below code inside middleware:
const { $i18n } = useNuxtApp();
const locale = $i18n.locale.value;
on nuxt 3.8 i had no IDE error any idea why?
1 Reply
Maybe write it like this?