Skip to content

Commit 65dbfec

Browse files
ktsnyyx990803
authored andcommittedOct 11, 2017
feat(typings): adapt to the new Vue typings (#909)
* feat(typings): adapt to the new vue typings BREAKING CHANGE: It is no longer compatible with the old Vue typings * chore(package): bump typescript and vue core typings * chore: bump vue * Update package.json
1 parent 285f9c0 commit 65dbfec

11 files changed

+20
-22
lines changed
 

Diff for: ‎package-lock.json

+1-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: ‎package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@
6767
"todomvc-app-css": "^2.1.0",
6868
"typescript": "^2.1.5",
6969
"uglify-js": "^3.1.2",
70-
"vue": "^2.4.3",
70+
"vue": "github:vuejs/vue#dev",
7171
"vue-loader": "^13.0.5",
72-
"vue-template-compiler": "^2.4.3",
72+
"vue-template-compiler": "^2.4.4",
7373
"webpack": "^3.6.0",
7474
"webpack-dev-middleware": "^1.10.0",
7575
"webpack-hot-middleware": "^2.19.1"

Diff for: ‎types/helpers.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Vue = require("vue");
1+
import Vue from 'vue';
22
import { Dispatch, Commit } from './index';
33

44
type Dictionary<T> = { [key: string]: T };

Diff for: ‎types/index.d.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import _Vue = require("vue");
2-
import { WatchOptions } from "vue";
1+
import _Vue, { WatchOptions } from "vue";
32

43
// augment typings of Vue.js
54
import "./vue";
@@ -121,3 +120,8 @@ export interface MutationTree<S> {
121120
export interface ModuleTree<R> {
122121
[key: string]: Module<any, R>;
123122
}
123+
124+
export default {
125+
Store,
126+
install
127+
};

Diff for: ‎types/test/helpers.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Vue = require("vue");
1+
import Vue from "vue";
22

33
import {
44
mapState,

Diff for: ‎types/test/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Vue = require("vue");
1+
import Vue from "vue";
22
import * as Vuex from "../index";
33
import createLogger from "../../dist/logger";
44

Diff for: ‎types/test/tsconfig.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"compilerOptions": {
3-
"module": "commonjs",
43
"target": "es5",
4+
"module": "es2015",
5+
"moduleResolution": "node",
56
"lib": [
67
"es5",
78
"dom",
89
"es2015.promise",
910
"es2015.core"
1011
],
11-
"noImplicitAny": true,
12-
"strictNullChecks": true,
12+
"strict": true,
1313
"noEmit": true
1414
},
1515
"include": [

Diff for: ‎types/test/vue.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Vue = require("vue");
1+
import Vue from "vue";
22
import * as Vuex from "../index";
33

44
const store = new Vuex.Store({

Diff for: ‎types/tsconfig.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"compilerOptions": {
3-
"module": "commonjs",
43
"target": "es5",
4+
"module": "es2015",
5+
"moduleResolution": "node",
56
"lib": [
67
"es5",
78
"dom",
89
"es2015.promise"
910
],
10-
"noImplicitAny": true,
11-
"strictNullChecks": true,
11+
"strict": true,
1212
"noEmit": true
1313
},
1414
"include": [

Diff for: ‎types/typings.json

-4
This file was deleted.

Diff for: ‎types/vue.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Extends interfaces in Vue.js
33
*/
44

5-
import Vue = require("vue");
5+
import Vue, { ComponentOptions } from "vue";
66
import { Store } from "./index";
77

88
declare module "vue/types/options" {

0 commit comments

Comments
 (0)