@evobug_com/safe-ts-feature-vue-router 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/package.json +22 -2
- package/safe/core.d.ts +36 -0
- package/safe/core.js +25 -0
- package/safe/errors.d.ts +16 -0
- package/safe/errors.js +10 -0
- package/safe/index.d.ts +16 -0
- package/safe/index.js +37 -0
- package/safe/runtime.d.ts +10 -0
- package/safe/runtime.js +16 -0
- package/safe-ts.json +56 -10
- package/vue-router-api.json +22 -0
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# @evobug_com/safe-ts-feature-vue-router
|
|
2
2
|
|
|
3
|
-
SAFE-TS
|
|
3
|
+
SAFE-TS feature pack for vue-router 4 and 5: which router methods reject or throw, with the exact errors, and safe versions of them that return a Result (push(router, to), resolve(router, to), ...), with the error types and guards.
|
|
4
4
|
|
|
5
5
|
**Documentation: [safe-ts.evobug-pages.com/vue/router](https://safe-ts.evobug-pages.com/vue/router)**
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
|
-
npm install
|
|
8
|
+
npm install @evobug_com/safe-ts-feature-vue-router
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
Part of [SAFE-TS](https://safe-ts.evobug-pages.com/), a strict, Rust-flavoured subset of TypeScript. The website has the
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evobug_com/safe-ts-feature-vue-router",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "SAFE-TS
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "SAFE-TS feature pack for vue-router 4 and 5: which router methods reject or throw, with the exact errors, and safe versions of them that return a Result (push(router, to), resolve(router, to), ...), with the error types and guards.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"safe-ts",
|
|
7
7
|
"typescript",
|
|
@@ -20,12 +20,32 @@
|
|
|
20
20
|
},
|
|
21
21
|
"bugs": "https://git.evobug.com/Evobug/Safe-Ts/issues",
|
|
22
22
|
"type": "module",
|
|
23
|
+
"sideEffects": false,
|
|
23
24
|
"files": [
|
|
24
25
|
"safe-ts.json",
|
|
26
|
+
"vue-router-api.json",
|
|
27
|
+
"safe",
|
|
25
28
|
"LICENSE-MIT",
|
|
26
29
|
"LICENSE-APACHE"
|
|
27
30
|
],
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"@evobug_com/safe-ts-std": "^0.4.0",
|
|
33
|
+
"vue-router": "^4.0.0 || ^5.0.0"
|
|
34
|
+
},
|
|
28
35
|
"publishConfig": {
|
|
29
36
|
"access": "public"
|
|
37
|
+
},
|
|
38
|
+
"exports": {
|
|
39
|
+
".": {
|
|
40
|
+
"types": "./safe/index.d.ts",
|
|
41
|
+
"default": "./safe/index.js"
|
|
42
|
+
},
|
|
43
|
+
"./errors": {
|
|
44
|
+
"types": "./safe/errors.d.ts",
|
|
45
|
+
"default": "./safe/errors.js"
|
|
46
|
+
},
|
|
47
|
+
"./safe-ts.json": "./safe-ts.json",
|
|
48
|
+
"./vue-router-api.json": "./vue-router-api.json",
|
|
49
|
+
"./package.json": "./package.json"
|
|
30
50
|
}
|
|
31
51
|
}
|
package/safe/core.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Generated from vue-router-api.json and vue-router's declarations by `npm run generate:safe` (packages/pack-kit/generate.ts): do not edit.
|
|
2
|
+
// The error types every pack's safe versions use, written from the pack's `error` texts
|
|
3
|
+
// (docs/guide/libraries.md#what-error-says), and their guards.
|
|
4
|
+
|
|
5
|
+
/** The class each error name of the notation stands for. */
|
|
6
|
+
export interface ErrorClasses {
|
|
7
|
+
Error: Error;
|
|
8
|
+
TypeError: TypeError;
|
|
9
|
+
RangeError: RangeError;
|
|
10
|
+
SyntaxError: SyntaxError;
|
|
11
|
+
URIError: URIError;
|
|
12
|
+
ReferenceError: ReferenceError;
|
|
13
|
+
}
|
|
14
|
+
type ClassOf<Name extends string> = Name extends keyof ErrorClasses ? ErrorClasses[Name] : Error;
|
|
15
|
+
|
|
16
|
+
/** `Name {props}`: an error without a `code`. `PlainError<"TypeError", { cause: unknown }>` is `TypeError {cause}`. */
|
|
17
|
+
export type PlainError<Name extends string = string, Props extends object = {}> = ClassOf<Name> & {
|
|
18
|
+
readonly name: Name;
|
|
19
|
+
readonly code?: undefined;
|
|
20
|
+
} & Readonly<Props>;
|
|
21
|
+
|
|
22
|
+
/** `Name [CODE] {props}`: an error with a `code`. `CodedError<"ERR_X", "TypeError">` is `TypeError [ERR_X]`. */
|
|
23
|
+
export type CodedError<Code extends string = string, Name extends string = string, Props extends object = {}> = ClassOf<Name> & {
|
|
24
|
+
readonly name: Name;
|
|
25
|
+
readonly code: Code;
|
|
26
|
+
} & Readonly<Props>;
|
|
27
|
+
|
|
28
|
+
/** `DOMException [Name]`: a DOMException with that `name`. */
|
|
29
|
+
export type DOMError<Name extends string = string> = DOMException & { readonly name: Name };
|
|
30
|
+
|
|
31
|
+
/** Is `e` an error of class `name` (any, if left out) without a `code`? */
|
|
32
|
+
export declare function isPlainError<Name extends string = string>(e: unknown, name?: Name): e is PlainError<Name>;
|
|
33
|
+
/** Is `e` an error whose `code` is `code` (any string, if left out)? */
|
|
34
|
+
export declare function isCodedError<Code extends string = string>(e: unknown, code?: Code): e is CodedError<Code>;
|
|
35
|
+
/** Is `e` a DOMException named `name` (any, if left out)? */
|
|
36
|
+
export declare function isDOMException<Name extends string = string>(e: unknown, name?: Name): e is DOMError<Name>;
|
package/safe/core.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// @safe-ts std
|
|
2
|
+
// Generated from vue-router-api.json and vue-router's declarations by `npm run generate:safe` (packages/pack-kit/generate.ts): do not edit.
|
|
3
|
+
// The error types every pack's safe versions use, and their guards (core.d.ts).
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Is it an error object? `Error.isError` where there is one (it sees errors from other realms
|
|
7
|
+
* too), or an instance of Error: a browser's own error classes that aren't real errors to
|
|
8
|
+
* `Error.isError` (Firefox's `OverconstrainedError`) are.
|
|
9
|
+
*/
|
|
10
|
+
const isError = typeof Error.isError === "function" ? (e) => Error.isError(e) || e instanceof Error : (e) => e instanceof Error;
|
|
11
|
+
|
|
12
|
+
/** `Name {props}`: an error of class `name` (any, if left out) without a `code`. */
|
|
13
|
+
export function isPlainError(e, name) {
|
|
14
|
+
return isError(e) && e.code === undefined && (name === undefined || e.name === name);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** `Name [CODE] {props}`: an error whose `code` is `code` (any string, if left out). */
|
|
18
|
+
export function isCodedError(e, code) {
|
|
19
|
+
return isError(e) && typeof e.code === "string" && (code === undefined || e.code === code);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** `DOMException [Name]`: a DOMException named `name` (any, if left out). */
|
|
23
|
+
export function isDOMException(e, name) {
|
|
24
|
+
return typeof DOMException === "function" && e instanceof DOMException && (name === undefined || e.name === name);
|
|
25
|
+
}
|
package/safe/errors.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// The errors vue-router's safe versions fail with, as the pack's `error` texts describe them
|
|
2
|
+
// (docs/guide/libraries.md#what-error-says), and guards that check a caught value against them.
|
|
3
|
+
// What a navigation guard throws (or returns, or passes to `next()`) and what a lazy route
|
|
4
|
+
// component's import rejects with are passed through as they are: `unknown`.
|
|
5
|
+
import type { PlainError } from "./core.js";
|
|
6
|
+
|
|
7
|
+
export * from "./core.js";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* `Error {type: 1, location}: No match for`: no route has the name asked for (vue-router's
|
|
11
|
+
* `ErrorTypes.MATCHER_NOT_FOUND`). `location` is the location that was asked for.
|
|
12
|
+
*/
|
|
13
|
+
export type MatcherError = PlainError<"Error", { type: 1; location: Record<string, unknown> }>;
|
|
14
|
+
|
|
15
|
+
/** Is `e` vue-router's "no match" error? */
|
|
16
|
+
export declare function isMatcherError(e: unknown): e is MatcherError;
|
package/safe/errors.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// @safe-ts std
|
|
2
|
+
// The guards of errors.d.ts.
|
|
3
|
+
import { isPlainError } from "./core.js";
|
|
4
|
+
|
|
5
|
+
export * from "./core.js";
|
|
6
|
+
|
|
7
|
+
/** Is `e` vue-router's "no match" error (`Error {type: 1, location}`: an unknown route name)? */
|
|
8
|
+
export function isMatcherError(e) {
|
|
9
|
+
return isPlainError(e, "Error") && e.type === 1 && typeof e.location === "object" && e.location !== null;
|
|
10
|
+
}
|
package/safe/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Generated from vue-router-api.json and vue-router's declarations by `npm run generate:safe` (packages/pack-kit/generate.ts): do not edit.
|
|
2
|
+
import type { Result } from "@evobug_com/safe-ts-std/result";
|
|
3
|
+
import type { MatcherError, PlainError } from "./errors.js";
|
|
4
|
+
import type * as $vueRouter from "vue-router";
|
|
5
|
+
export * from "vue-router";
|
|
6
|
+
|
|
7
|
+
/** `Router#isReady()` (vue-router), with what it rejects with returned as an `Err`: `(what the initial navigation failed with)`. */
|
|
8
|
+
export declare function isReady(router: $vueRouter.Router): Promise<Result<void, unknown>>;
|
|
9
|
+
/** `Router#push()` (vue-router), with what it rejects with returned as an `Err`: `Error {type: 1, location}: No match for | Error: Missing required param | (what a navigation guard throws, returns or passes to next) | (what a lazy route component's import rejects with) | Error: Couldn't resolve component`. */
|
|
10
|
+
export declare function push(router: $vueRouter.Router, to: $vueRouter.RouteLocationRaw): Promise<Result<$vueRouter.NavigationFailure | void | undefined, unknown>>;
|
|
11
|
+
/** `Router#replace()` (vue-router), with what it rejects with returned as an `Err`: `Error {type: 1, location}: No match for | Error: Missing required param | (what a navigation guard throws, returns or passes to next) | (what a lazy route component's import rejects with) | Error: Couldn't resolve component`. */
|
|
12
|
+
export declare function replace(router: $vueRouter.Router, to: $vueRouter.RouteLocationRaw): Promise<Result<$vueRouter.NavigationFailure | void | undefined, unknown>>;
|
|
13
|
+
/** `Router#resolve()` (vue-router), with what it throws returned as an `Err`: `Error {type: 1, location}: No match for | Error: Missing required param`. */
|
|
14
|
+
export declare function resolve<Name extends keyof $vueRouter.RouteMap = keyof $vueRouter.RouteMap>(router: $vueRouter.Router, to: $vueRouter.RouteLocationAsRelativeTyped<$vueRouter.RouteMap, Name>, currentLocation?: $vueRouter.RouteLocationNormalizedLoaded): Result<$vueRouter.RouteLocationResolved<Name>, MatcherError | PlainError<"Error">>;
|
|
15
|
+
/** `Router#resolve()` (vue-router), with what it throws returned as an `Err`: `Error {type: 1, location}: No match for | Error: Missing required param`. */
|
|
16
|
+
export declare function resolve(router: $vueRouter.Router, to: $vueRouter.RouteLocationAsString | $vueRouter.RouteLocationAsRelative | $vueRouter.RouteLocationAsPath, currentLocation?: $vueRouter.RouteLocationNormalizedLoaded): Result<$vueRouter.RouteLocationResolved, MatcherError | PlainError<"Error">>;
|
package/safe/index.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// @safe-ts std
|
|
2
|
+
// Generated from vue-router-api.json and vue-router's declarations by `npm run generate:safe` (packages/pack-kit/generate.ts): do not edit.
|
|
3
|
+
import { Err } from "@evobug_com/safe-ts-std/result";
|
|
4
|
+
import { failed, ok } from "./runtime.js";
|
|
5
|
+
export * from "vue-router";
|
|
6
|
+
|
|
7
|
+
export function isReady(self, ...args) {
|
|
8
|
+
try {
|
|
9
|
+
return Promise.resolve(self.isReady(...args)).then(ok, failed);
|
|
10
|
+
} catch (error) {
|
|
11
|
+
return Promise.resolve(new Err(error));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function push(self, ...args) {
|
|
16
|
+
try {
|
|
17
|
+
return Promise.resolve(self.push(...args)).then(ok, failed);
|
|
18
|
+
} catch (error) {
|
|
19
|
+
return Promise.resolve(new Err(error));
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function replace(self, ...args) {
|
|
24
|
+
try {
|
|
25
|
+
return Promise.resolve(self.replace(...args)).then(ok, failed);
|
|
26
|
+
} catch (error) {
|
|
27
|
+
return Promise.resolve(new Err(error));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function resolve(self, ...args) {
|
|
32
|
+
try {
|
|
33
|
+
return self.resolve(...args);
|
|
34
|
+
} catch (error) {
|
|
35
|
+
return new Err(error);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated from vue-router-api.json and vue-router's declarations by `npm run generate:safe` (packages/pack-kit/generate.ts): do not edit.
|
|
2
|
+
// The promise handlers the safe versions of rejecting members share (runtime.js).
|
|
3
|
+
import type { Err, Option } from "@evobug_com/safe-ts-std/result";
|
|
4
|
+
|
|
5
|
+
/** The value the original's promise resolved to. */
|
|
6
|
+
export declare const ok: <T>(value: T) => T;
|
|
7
|
+
/** What the original's promise rejected with, as an `Err`. */
|
|
8
|
+
export declare const failed: (error: unknown) => Err<unknown>;
|
|
9
|
+
/** What the original's promise resolved to, with `null` as `undefined` (an `Option`). */
|
|
10
|
+
export declare const option: <T>(value: T | null) => Option<T>;
|
package/safe/runtime.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// @safe-ts std
|
|
2
|
+
// Generated from vue-router-api.json and vue-router's declarations by `npm run generate:safe` (packages/pack-kit/generate.ts): do not edit.
|
|
3
|
+
// What the safe versions of members that reject share: the handlers of the original's promise
|
|
4
|
+
// (`Promise.resolve(original(...args)).then(ok, failed)`), so it resolves to the value or an
|
|
5
|
+
// `Err`, never rejects (`option` when it may resolve to `null`). Each safe version calls its original itself (the generator writes it
|
|
6
|
+
// out), so V8 optimizes every call site for the one function it calls.
|
|
7
|
+
import { Err } from "@evobug_com/safe-ts-std/result";
|
|
8
|
+
|
|
9
|
+
/** The value the original's promise resolved to. */
|
|
10
|
+
export const ok = (value) => value;
|
|
11
|
+
|
|
12
|
+
/** What the original's promise rejected with, as an `Err`. */
|
|
13
|
+
export const failed = (error) => new Err(error);
|
|
14
|
+
|
|
15
|
+
/** What the original's promise resolved to, with `null` as `undefined` (an `Option`). */
|
|
16
|
+
export const option = (value) => value ?? undefined;
|
package/safe-ts.json
CHANGED
|
@@ -1,27 +1,73 @@
|
|
|
1
1
|
{
|
|
2
|
+
"$comment": "Generated from vue-router-api.json and safe-api.json by test/pack.ts: do not edit. `error` is what a member throws or rejects with, written the way Node prints errors: `Name [CODE] {props}`. Name is the error's `name` (`Error`, `TypeError`, `RangeError`, `SystemError`, `AbortError`, `DOMException`, ...). [CODE] is its `code` (for a DOMException, its `name`); `[A | B]` is one of these; `PREFIX*` is any code with that prefix (`E*`: an errno name from libuv, the code of a system error, such as 'ENOENT'; `ERR_OSSL_*`: an OpenSSL error; `ERR_FS_CP_*`: the ones Node defines); `[dns.*]` is one of the error codes node:dns exports. Without brackets it has no `code`. {props} are its other own properties: `errno` always set, `path?` sometimes, `syscall: 'open' | 'read'` with one of these values. `: text` at the end: its message starts with text (for errors without a code). `(text)` is a value passed through unchanged, such as what your callback throws or the error a stream was destroyed with. `A | B` is either one. Errors for wrong argument types or values and for calls in the wrong state (after close()) are not listed: those are the `args` category.",
|
|
2
3
|
"library": "vue-router",
|
|
3
|
-
"versions": {
|
|
4
|
+
"versions": {
|
|
5
|
+
"min": "4.0.0",
|
|
6
|
+
"below": "6.0.0"
|
|
7
|
+
},
|
|
4
8
|
"modules": [
|
|
5
9
|
{
|
|
6
|
-
"specifiers": [
|
|
10
|
+
"specifiers": [
|
|
11
|
+
"vue-router",
|
|
12
|
+
"@evobug_com/safe-ts-feature-vue-router"
|
|
13
|
+
],
|
|
7
14
|
"methods": {
|
|
8
|
-
"
|
|
15
|
+
"isReady": {
|
|
9
16
|
"fails": "rejects",
|
|
10
|
-
"error": "
|
|
17
|
+
"error": "(what the initial navigation failed with)"
|
|
11
18
|
},
|
|
12
|
-
"
|
|
19
|
+
"push": {
|
|
13
20
|
"fails": "rejects",
|
|
14
|
-
"error": "Error (a guard
|
|
21
|
+
"error": "Error {type: 1, location}: No match for | Error: Missing required param | (what a navigation guard throws, returns or passes to next) | (what a lazy route component's import rejects with) | Error: Couldn't resolve component"
|
|
15
22
|
},
|
|
16
|
-
"
|
|
23
|
+
"replace": {
|
|
17
24
|
"fails": "rejects",
|
|
18
|
-
"error": "Error
|
|
25
|
+
"error": "Error {type: 1, location}: No match for | Error: Missing required param | (what a navigation guard throws, returns or passes to next) | (what a lazy route component's import rejects with) | Error: Couldn't resolve component"
|
|
19
26
|
},
|
|
20
27
|
"resolve": {
|
|
21
28
|
"fails": "throws",
|
|
22
|
-
"error": "Error
|
|
29
|
+
"error": "Error {type: 1, location}: No match for | Error: Missing required param"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"classes": {
|
|
33
|
+
"Router": {
|
|
34
|
+
"methods": {
|
|
35
|
+
"isReady": {
|
|
36
|
+
"fails": "rejects",
|
|
37
|
+
"error": "(what the initial navigation failed with)",
|
|
38
|
+
"safe": "@evobug_com/safe-ts-feature-vue-router isReady"
|
|
39
|
+
},
|
|
40
|
+
"push": {
|
|
41
|
+
"fails": "rejects",
|
|
42
|
+
"error": "Error {type: 1, location}: No match for | Error: Missing required param | (what a navigation guard throws, returns or passes to next) | (what a lazy route component's import rejects with) | Error: Couldn't resolve component",
|
|
43
|
+
"safe": "@evobug_com/safe-ts-feature-vue-router push"
|
|
44
|
+
},
|
|
45
|
+
"replace": {
|
|
46
|
+
"fails": "rejects",
|
|
47
|
+
"error": "Error {type: 1, location}: No match for | Error: Missing required param | (what a navigation guard throws, returns or passes to next) | (what a lazy route component's import rejects with) | Error: Couldn't resolve component",
|
|
48
|
+
"safe": "@evobug_com/safe-ts-feature-vue-router replace"
|
|
49
|
+
},
|
|
50
|
+
"resolve": {
|
|
51
|
+
"fails": "throws",
|
|
52
|
+
"error": "Error {type: 1, location}: No match for | Error: Missing required param",
|
|
53
|
+
"safe": "@evobug_com/safe-ts-feature-vue-router resolve"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
23
56
|
}
|
|
57
|
+
},
|
|
58
|
+
"creates": {
|
|
59
|
+
"createRouter": "vue-router Router",
|
|
60
|
+
"useRouter": "vue-router Router"
|
|
24
61
|
}
|
|
25
62
|
}
|
|
26
|
-
]
|
|
63
|
+
],
|
|
64
|
+
"safe": {
|
|
65
|
+
"@evobug_com/safe-ts-feature-vue-router": [
|
|
66
|
+
"isReady",
|
|
67
|
+
"push",
|
|
68
|
+
"replace",
|
|
69
|
+
"resolve"
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
"option": {}
|
|
27
73
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "The router methods of vue-router 4 that fail, by how, with what they fail with in the notation of safe-ts.json's $comment (docs/guide/libraries.md, \"What `error` says\"). test/vue-router.test.ts makes each failure happen against the installed vue-router and checks it against the text; safe-ts.json and the safe versions are generated from this file (`npm run generate:safe`). `push` and `replace` throw an unknown route name or a missing required param synchronously, before their promise exists, and reject with the rest; their safe versions return both in the promise. A lazy route component whose import resolves to nothing fails with `Couldn't resolve component`; in 4.0.x so does one whose import rejects. A navigation a guard stops (`return false`), one a newer navigation cancels and one to the current location don't fail: the promise resolves to a NavigationFailure. `isReady()` before any navigation stays pending. go/back/forward call `history.go` and return nothing; useLink's `navigate` (and so <RouterLink>) catches push's rejection itself.",
|
|
3
|
+
"library": "vue-router",
|
|
4
|
+
"versions": { "min": "4.0.0", "below": "6.0.0" },
|
|
5
|
+
"errors": {
|
|
6
|
+
"vue-router": {
|
|
7
|
+
"Router#push": "Error {type: 1, location}: No match for | Error: Missing required param | (what a navigation guard throws, returns or passes to next) | (what a lazy route component's import rejects with) | Error: Couldn't resolve component",
|
|
8
|
+
"Router#replace": "Error {type: 1, location}: No match for | Error: Missing required param | (what a navigation guard throws, returns or passes to next) | (what a lazy route component's import rejects with) | Error: Couldn't resolve component",
|
|
9
|
+
"Router#isReady": "(what the initial navigation failed with)",
|
|
10
|
+
"Router#resolve": "Error {type: 1, location}: No match for | Error: Missing required param"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"creates": {
|
|
14
|
+
"vue-router": { "createRouter": "Router", "useRouter": "Router" }
|
|
15
|
+
},
|
|
16
|
+
"modules": {
|
|
17
|
+
"vue-router": {
|
|
18
|
+
"rejects": ["Router#push", "Router#replace", "Router#isReady"],
|
|
19
|
+
"throws": ["Router#resolve"]
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|