diff --git a/decls/i18n.js b/decls/i18n.js index e8be3b0b1..f5f04d47f 100644 --- a/decls/i18n.js +++ b/decls/i18n.js @@ -77,6 +77,7 @@ declare type I18nOptions = { pluralizationRules?: PluralizationRules, preserveDirectiveContent?: boolean, warnHtmlInMessage?: WarnHtmlInMessageLevel, + sharedMessages?: LocaleMessage, }; declare type IntlAvailability = { diff --git a/types/index.d.ts b/types/index.d.ts index 07438a427..fe34985e7 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -106,6 +106,7 @@ declare namespace VueI18n { preserveDirectiveContent?: boolean; pluralizationRules?: PluralizationRulesMap; warnHtmlInMessage?: WarnHtmlInMessageLevel; + sharedMessages?: LocaleMessages; } } @@ -218,6 +219,7 @@ declare module 'vue/types/options' { messages?: VueI18n.LocaleMessages; dateTimeFormats?: VueI18n.DateTimeFormats; numberFormats?: VueI18n.NumberFormats; + sharedMessages?: VueI18n.LocaleMessages; }; } } diff --git a/types/test/component.ts b/types/test/component.ts index 23d152727..4d3a0d94f 100644 --- a/types/test/component.ts +++ b/types/test/component.ts @@ -31,6 +31,10 @@ const Component1 = { messages: { en: { message: { hello: 'hello component1' } }, ja: { message: { hello: 'こんにちは、component1' } } + }, + sharedMessages: { + en: { buttons: { save: 'Save'} }, + ja: { buttons: { save: 'Save'} } } } }