You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
The i18n variable type I passed into
setI18nLanguageis displayed as:This is incompatible with type
I18N, giving an type error:Argument of type 'I18n<{ en: { title: string; currentHost: string; inoperableTip: string; }; ja: { title: string; currentHost: string; inoperableTip: string; }; cn: { title: string; currentHost: string; inoperableTip: string; }; }, { en: DateTimeFormat; ja: DateTimeFormat; cn: DateTimeFormat; }, { en: NumberFormat; ja: NumberFormat; cn: NumberFormat; }, string, true>' is not assignable to parameter of type 'I18n<{}, {}, {}, string, boolean>'. Types of property 'global' are incompatible. Type 'VueI18n<{ en: { title: string; currentHost: string; inoperableTip: string; }; ja: { title: string; currentHost: string; inoperableTip: string; }; cn: { title: string; currentHost: string; inoperableTip: string; }; }, { en: DateTimeFormat; ja: DateTimeFormat; cn: DateTimeFormat; }, { en: NumberFormat; ja: NumberFormat; cn: NumberFormat; }, string, "en" | "ja" | "cn", "en" | "ja" | "cn", Composer<{ en: { title: string; currentHost: string; inoperableTip: string; }; ja: { title: string; currentHost: string; inoperableTip: string; }; cn: { title: string; currentHost: string; inoperableTip: string; }; }, { en: DateTimeFormat; ja: DateTimeFormat; cn: DateTimeFormat; }, { en: NumberFormat; ja: NumberFormat; cn: NumberFormat; }, string, "en" | "ja" | "cn", "en" | "ja" | "cn">>' is not assignable to type 'Composer<{}, {}, {}, string, never, string> | VueI18n<{}, {}, {}, string, never, string, Composer<{}, {}, {}, string, never, string>>'. Type 'VueI18n<{ en: { title: string; currentHost: string; inoperableTip: string; }; ja: { title: string; currentHost: string; inoperableTip: string; }; cn: { title: string; currentHost: string; inoperableTip: string; }; }, { en: DateTimeFormat; ja: DateTimeFormat; cn: DateTimeFormat; }, { en: NumberFormat; ja: NumberFormat; cn: NumberFormat; }, string, "en" | "ja" | "cn", "en" | "ja" | "cn", Composer<{ en: { title: string; currentHost: string; inoperableTip: string; }; ja: { title: string; currentHost: string; inoperableTip: string; }; cn: { title: string; currentHost: string; inoperableTip: string; }; }, { en: DateTimeFormat; ja: DateTimeFormat; cn: DateTimeFormat; }, { en: NumberFormat; ja: NumberFormat; cn: NumberFormat; }, string, "en" | "ja" | "cn", "en" | "ja" | "cn">>' is not assignable to type 'VueI18n<{}, {}, {}, string, never, string, Composer<{}, {}, {}, string, never, string>>'. Types of property 't' are incompatible. Type 'VueI18nTranslation<{ en: { title: string; currentHost: string; inoperableTip: string; }; ja: { title: string; currentHost: string; inoperableTip: string; }; cn: { title: string; currentHost: string; inoperableTip: string; }; }, "en" | "ja" | "cn", RemoveIndexSignature<{ [x: string]: LocaleMessageValue<VueMessageType>; }>, never, _ResourcePath<{ title: string; currentHost: string; inoperableTip: string; }>, _ResourcePath<{ title: string; currentHost: string; inoperableTip: string; }>>' is not assignable to type 'VueI18nTranslation<{}, string, RemoveIndexSignature<{ [x: string]: LocaleMessageValue<VueMessageType>; }>, never, never, never>'. Type 'string' is not assignable to type '"en" | "ja" | "cn"'.ts(2345)How can I provide the correct
I18Ntype tosetI18nLanguagehere?Beta Was this translation helpful? Give feedback.
All reactions