-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(typings): adapt to the new Vue typings (#1685)
BREAKING CHANGE: It is no longer compatible with the old Vue typings
- Loading branch information
Showing
8 changed files
with
24 additions
and
38 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 |
---|---|---|
@@ -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