From cc34d23ba327ee3e08bb58e95bb91ff633ffa87d Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 20 May 2019 22:08:15 +0100 Subject: [PATCH] vuex-i18n: Adds $t() alias function definition (#35408) * vuex-i18n: Adds $t() alias function definition "options" object should be optional * trailing space --- types/vuex-i18n/index.d.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/types/vuex-i18n/index.d.ts b/types/vuex-i18n/index.d.ts index f6b75afa1a..6db628a849 100644 --- a/types/vuex-i18n/index.d.ts +++ b/types/vuex-i18n/index.d.ts @@ -11,6 +11,8 @@ import _Vue, { PluginObject } from "vue"; declare module "vue/types/vue" { interface Vue { $i18n: Ii18n; + $t(key: string, options?: any, pluralization?: number): string | undefined; + $t(key: string, defaultValue: string, options?: any, pluralization?: number): string | undefined; } interface VueConstructor { @@ -66,13 +68,13 @@ export interface Ii18n { * get localized string from store. note that we pass the arguments passed * to the function directly to the translateInLanguage function */ - translate(key: string, options: any, pluralization?: number): string | undefined; + translate(key: string, options?: any, pluralization?: number): string | undefined; /** * get localized string from store. note that we pass the arguments passed * to the function directly to the translateInLanguage function */ - translate(key: string, defaultValue: string, options: any, pluralization?: number): string | undefined; + translate(key: string, defaultValue: string, options?: any, pluralization?: number): string | undefined; /** * get localized string from store in a given language if available.