Skip to content

Commit

Permalink
feat(typings): adapt to the new Vue typings (#909)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
ktsn authored and yyx990803 committed Oct 11, 2017
1 parent 285f9c0 commit 65dbfec
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 22 deletions.
4 changes: 1 addition & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@
"todomvc-app-css": "^2.1.0",
"typescript": "^2.1.5",
"uglify-js": "^3.1.2",
"vue": "^2.4.3",
"vue": "github:vuejs/vue#dev",
"vue-loader": "^13.0.5",
"vue-template-compiler": "^2.4.3",
"vue-template-compiler": "^2.4.4",
"webpack": "^3.6.0",
"webpack-dev-middleware": "^1.10.0",
"webpack-hot-middleware": "^2.19.1"
Expand Down
2 changes: 1 addition & 1 deletion types/helpers.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Vue = require("vue");
import Vue from 'vue';
import { Dispatch, Commit } from './index';

type Dictionary<T> = { [key: string]: T };
Expand Down
8 changes: 6 additions & 2 deletions types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import _Vue = require("vue");
import { WatchOptions } from "vue";
import _Vue, { WatchOptions } from "vue";

// augment typings of Vue.js
import "./vue";
Expand Down Expand Up @@ -121,3 +120,8 @@ export interface MutationTree<S> {
export interface ModuleTree<R> {
[key: string]: Module<any, R>;
}

export default {
Store,
install
};
2 changes: 1 addition & 1 deletion types/test/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Vue = require("vue");
import Vue from "vue";

import {
mapState,
Expand Down
2 changes: 1 addition & 1 deletion types/test/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Vue = require("vue");
import Vue from "vue";
import * as Vuex from "../index";
import createLogger from "../../dist/logger";

Expand Down
6 changes: 3 additions & 3 deletions types/test/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"module": "es2015",
"moduleResolution": "node",
"lib": [
"es5",
"dom",
"es2015.promise",
"es2015.core"
],
"noImplicitAny": true,
"strictNullChecks": true,
"strict": true,
"noEmit": true
},
"include": [
Expand Down
2 changes: 1 addition & 1 deletion types/test/vue.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Vue = require("vue");
import Vue from "vue";
import * as Vuex from "../index";

const store = new Vuex.Store({
Expand Down
6 changes: 3 additions & 3 deletions types/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"module": "es2015",
"moduleResolution": "node",
"lib": [
"es5",
"dom",
"es2015.promise"
],
"noImplicitAny": true,
"strictNullChecks": true,
"strict": true,
"noEmit": true
},
"include": [
Expand Down
4 changes: 0 additions & 4 deletions types/typings.json

This file was deleted.

2 changes: 1 addition & 1 deletion types/vue.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Extends interfaces in Vue.js
*/

import Vue = require("vue");
import Vue, { ComponentOptions } from "vue";
import { Store } from "./index";

declare module "vue/types/options" {
Expand Down

0 comments on commit 65dbfec

Please sign in to comment.