vuex-i18n: Adds $t() alias function definition (#35408)

* vuex-i18n: Adds $t() alias function definition 

"options" object should be optional

* trailing space
This commit is contained in:
Alex 2019-05-20 22:08:15 +01:00 committed by Ryan Cavanaugh
parent c102f3c275
commit cc34d23ba3

View File

@ -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<V extends Vue = Vue> {
@ -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.