Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(typings): adapt to the new Vue typings #909

Merged
merged 8 commits into from
Oct 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
343 changes: 227 additions & 116 deletions package-lock.json

Large diffs are not rendered by default.

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