Skip to content

Commit

Permalink
feat: add sync property (#1388)
Browse files Browse the repository at this point in the history
* feat: add sync property

* fix
  • Loading branch information
kazupon authored Sep 23, 2021
1 parent d4159ea commit 84040cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,9 @@ export default class VueI18n {
get postTranslation (): ?PostTranslationHandler { return this._postTranslation }
set postTranslation (handler: PostTranslationHandler): void { this._postTranslation = handler }

get sync (): boolean { return this._sync }
set sync (val: boolean): void { this._sync = val }

_getMessages (): LocaleMessages { return this._vm.messages }
_getDateTimeFormats (): DateTimeFormats { return this._vm.dateTimeFormats }
_getNumberFormats (): NumberFormats { return this._vm.numberFormats }
Expand Down
2 changes: 2 additions & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ export declare interface IVueI18n {
silentTranslationWarn: boolean | RegExp;
silentFallbackWarn: boolean | RegExp;
preserveDirectiveContent: boolean;
sync: boolean;
pluralizationRules: VueI18n.PluralizationRulesMap;
warnHtmlInMessage: VueI18n.WarnHtmlInMessageLevel;
postTranslation: VueI18n.PostTranslationHandler;
Expand Down Expand Up @@ -228,6 +229,7 @@ declare class VueI18n {
pluralizationRules: VueI18n.PluralizationRulesMap;
warnHtmlInMessage: VueI18n.WarnHtmlInMessageLevel;
postTranslation: VueI18n.PostTranslationHandler;
sync: boolean;

t(key: VueI18n.Path, values?: VueI18n.Values): VueI18n.TranslateResult;
t(key: VueI18n.Path, locale: VueI18n.Locale, values?: VueI18n.Values): VueI18n.TranslateResult;
Expand Down

0 comments on commit 84040cb

Please sign in to comment.