mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 11:57:33 +08:00
vuex-i18n: Fixes from code review (#21418)
This commit is contained in:
11
types/vuex-i18n/index.d.ts
vendored
11
types/vuex-i18n/index.d.ts
vendored
@@ -6,8 +6,15 @@
|
||||
|
||||
import _Vue, { PluginObject } from "vue";
|
||||
|
||||
// augment typings of Vue.js
|
||||
import "./vue";
|
||||
declare module "vue/types/vue" {
|
||||
interface Vue {
|
||||
$i18n: Ii18n;
|
||||
}
|
||||
|
||||
interface VueConstructor<V extends Vue = Vue> {
|
||||
i18n: Ii18n;
|
||||
}
|
||||
}
|
||||
|
||||
export interface Translations {
|
||||
[key: string]: string;
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
"module": "commonjs",
|
||||
"target": "es5",
|
||||
"lib": [
|
||||
"es5",
|
||||
"es2015"
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"types": [],
|
||||
"baseUrl": "../",
|
||||
@@ -20,7 +20,6 @@
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"vue.d.ts",
|
||||
"vuex-i18n-tests.ts"
|
||||
]
|
||||
}
|
||||
15
types/vuex-i18n/vue.d.ts
vendored
15
types/vuex-i18n/vue.d.ts
vendored
@@ -1,15 +0,0 @@
|
||||
/**
|
||||
* Extends interfaces in Vue.js
|
||||
*/
|
||||
import Vue from "vue";
|
||||
import { Ii18n } from "./index";
|
||||
|
||||
declare module "vue/types/vue" {
|
||||
interface Vue {
|
||||
$i18n: Ii18n;
|
||||
}
|
||||
|
||||
interface VueConstructor<V extends Vue = Vue> {
|
||||
i18n: Ii18n;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user