-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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 #1685
Merged
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
9d8348f
feat(typings): adapt to the new vue typings
ktsn 6f06733
Merge branch 'dev' of https://github.com/vuejs/vue-router into adapt-…
ktsn 800a210
chore(package): bump deps
ktsn f67bccd
Merge remote-tracking branch 'upstream/dev' into adapt-new-typings
ktsn b903792
chore: bump vue
ktsn 4bb9bc3
Merge branch 'dev' into adapt-new-typings
yyx990803 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,16 @@ | ||
import "./vue"; | ||
import * as R from "./router"; | ||
import { VueRouter } from "./router"; | ||
|
||
// `VueRouter` in `export = VueRouter` must be a namespace | ||
// All available types are exported via this namespace | ||
declare namespace VueRouter { | ||
export type RouterMode = R.RouterMode; | ||
export type RawLocation = R.RawLocation; | ||
export type RedirectOption = R.RedirectOption; | ||
export type RouterOptions = R.RouterOptions; | ||
export type RouteConfig = R.RouteConfig; | ||
export type RouteRecord = R.RouteRecord; | ||
export type Location = R.Location; | ||
export type Route = R.Route; | ||
export type NavigationGuard = R.NavigationGuard; | ||
} | ||
export default VueRouter; | ||
|
||
// TS cannot merge imported class with namespace, declare a subclass to bypass | ||
declare class VueRouter extends R.VueRouter {} | ||
|
||
export = VueRouter; | ||
export { | ||
RouterMode, | ||
RawLocation, | ||
RedirectOption, | ||
RouterOptions, | ||
RouteConfig, | ||
RouteRecord, | ||
Location, | ||
Route, | ||
NavigationGuard | ||
} from "./router"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -570,12 +570,6 @@ babel-plugin-transform-strict-mode@^6.24.1: | |
babel-runtime "^6.22.0" | ||
babel-types "^6.24.1" | ||
|
||
babel-preset-es2015-loose@^8.0.0: | ||
version "8.0.0" | ||
resolved "https://registry.yarnpkg.com/babel-preset-es2015-loose/-/babel-preset-es2015-loose-8.0.0.tgz#82ee293ab31329c7a94686b644b62adfbcdc3f57" | ||
dependencies: | ||
modify-babel-preset "^3.1.0" | ||
|
||
babel-preset-es2015@^6.24.1: | ||
version "6.24.1" | ||
resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz#d44050d6bc2c9feea702aaf38d727a0210538939" | ||
|
@@ -3010,12 +3004,6 @@ [email protected]: | |
mkdirp "0.5.1" | ||
supports-color "3.1.2" | ||
|
||
modify-babel-preset@^3.1.0: | ||
version "3.2.1" | ||
resolved "https://registry.yarnpkg.com/modify-babel-preset/-/modify-babel-preset-3.2.1.tgz#d7172aa3c0822ed3fc08e308fd0971295136ab50" | ||
dependencies: | ||
require-relative "^0.8.7" | ||
|
||
[email protected]: | ||
version "0.7.1" | ||
resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" | ||
|
@@ -4019,7 +4007,7 @@ require-main-filename@^1.0.1: | |
version "1.0.1" | ||
resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" | ||
|
||
[email protected], require-relative@^0.8.7: | ||
[email protected]: | ||
version "0.8.7" | ||
resolved "https://registry.yarnpkg.com/require-relative/-/require-relative-0.8.7.tgz#7999539fc9e047a37928fa196f8e1563dabd36de" | ||
|
||
|
@@ -4563,9 +4551,9 @@ typedarray@^0.0.6, typedarray@~0.0.5: | |
version "0.0.6" | ||
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" | ||
|
||
typescript@^2.0.3: | ||
version "2.4.0" | ||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.4.0.tgz#aef5a8d404beba36ad339abf079ddddfffba86dd" | ||
typescript@^2.4.2: | ||
version "2.4.2" | ||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.4.2.tgz#f8395f85d459276067c988aa41837a8f82870844" | ||
|
||
uglify-js@^2.8.27: | ||
version "2.8.29" | ||
|
@@ -4700,9 +4688,9 @@ vue-style-loader@^3.0.0: | |
hash-sum "^1.0.2" | ||
loader-utils "^1.0.2" | ||
|
||
vue-template-compiler@^2.3.0: | ||
version "2.3.4" | ||
resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.3.4.tgz#5a88ac2c5e4d5d6218e6aa80e7e221fb7e67894c" | ||
vue-template-compiler@^2.4.2: | ||
version "2.4.2" | ||
resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.4.2.tgz#5a45d843f148b098f6c1d1e35ac20c4956d30ad1" | ||
dependencies: | ||
de-indent "^1.0.2" | ||
he "^1.1.0" | ||
|
@@ -4711,9 +4699,9 @@ vue-template-es2015-compiler@^1.2.2: | |
version "1.5.2" | ||
resolved "https://registry.yarnpkg.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.5.2.tgz#a0a6c50c941d2a4abda963f2f42c337ac450ee95" | ||
|
||
vue@^2.3.0: | ||
version "2.3.4" | ||
resolved "https://registry.yarnpkg.com/vue/-/vue-2.3.4.tgz#5ec3b87a191da8090bbef56b7cfabd4158038171" | ||
vue@DanielRosenwasser/vue#e4a8545: | ||
version "2.4.2" | ||
resolved "https://codeload.github.com/DanielRosenwasser/vue/tar.gz/e4a8545" | ||
|
||
watchpack@^1.3.1: | ||
version "1.3.1" | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line will change once the other PR at vuejs/vue gets merged, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, exactly!