mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
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:
parent
c102f3c275
commit
cc34d23ba3
6
types/vuex-i18n/index.d.ts
vendored
6
types/vuex-i18n/index.d.ts
vendored
@ -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.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user