Skip to content
This repository was archived by the owner on Dec 31, 2024. It is now read-only.

Commit dee35b9

Browse files
committed
⚡ improvement(typescript): update typings
1 parent 44e04e7 commit dee35b9

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

types/index.d.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,9 @@ declare namespace VueI18n {
9292
fallbackRoot?: boolean;
9393
sync?: boolean;
9494
silentTranslationWarn?: boolean;
95-
pluralizationRules?: PluralizationRulesMap;
95+
silentFallbackWarn?: boolean;
9696
preserveDirectiveContent?: boolean;
97+
pluralizationRules?: PluralizationRulesMap;
9798
}
9899
}
99100

@@ -129,8 +130,9 @@ export declare interface IVueI18n {
129130
missing: VueI18n.MissingHandler;
130131
formatter: VueI18n.Formatter;
131132
silentTranslationWarn: boolean;
132-
pluralizationRules: VueI18n.PluralizationRulesMap;
133+
silentFallbackWarn: boolean;
133134
preserveDirectiveContent: boolean;
135+
pluralizationRules: VueI18n.PluralizationRulesMap;
134136
}
135137

136138
declare class VueI18n {
@@ -145,6 +147,9 @@ declare class VueI18n {
145147
missing: VueI18n.MissingHandler;
146148
formatter: VueI18n.Formatter;
147149
silentTranslationWarn: boolean;
150+
silentFallbackWarn: boolean;
151+
preserveDirectiveContent: boolean;
152+
pluralizationRules: VueI18n.PluralizationRulesMap;
148153

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

types/test/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ const i18n = new VueI18n({
6363
fallbackRoot: false,
6464
sync: true,
6565
silentTranslationWarn: true,
66+
silentFallbackWarn: true,
6667
preserveDirectiveContent: true,
6768
});
6869
i18n.messages[locale][key]; // $ExpectType LocaleMessage
@@ -73,6 +74,7 @@ i18n.fallbackLocale; // $ExpectType string
7374
i18n.missing; // $ExpectType MissingHandler
7475
i18n.formatter; // $ExpectType Formatter
7576
i18n.silentTranslationWarn; // $ExpectType boolean
77+
i18n.silentFallbackWarn; // $ExpectType boolean
7678
i18n.preserveDirectiveContent; // $ExpectType boolean
7779
i18n.setLocaleMessage; // $ExpectType (locale: string, message: LocaleMessageObject) => void
7880
i18n.getLocaleMessage; // $ExpectType (locale: string) => LocaleMessageObject

0 commit comments

Comments
 (0)