Skip to content

Commit da9423e

Browse files
committed
[docs] return value for chainable methods
1 parent e2aa66a commit da9423e

File tree

6 files changed

+24
-0
lines changed

6 files changed

+24
-0
lines changed

docs/en/api/after-each.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ You can add multiple global after hooks to the same router. These hooks will be
1212

1313
The hook function receives a single argument which is a [Transition Object](../pipeline/hooks.html#transition-object), but you can only access its `to` and `from` properties, which are route objects. You **cannot** call transition methods in the global after hook.
1414

15+
### Returns
16+
17+
- The router instance itself.
18+
1519
### Example
1620

1721
``` js

docs/en/api/alias.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ For example, if we alias `/a` to `/a/b/c`, when we visit `/a`, the browser URL w
1010

1111
The alias map object should be in the form of { fromPath: toPath, ... }. The paths can contain dynamic segments.
1212

13+
### Returns
14+
15+
- The router instance itself.
16+
1317
### Example
1418

1519
``` js

docs/en/api/before-each.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ You can add multiple global before hooks to the same router. These hooks will be
1010

1111
The hook function receives a single argument which is a [Transition Object](../pipeline/hooks.html#transition-object).
1212

13+
### Returns
14+
15+
- The router instance itself.
16+
1317
### Example
1418

1519
Basic

docs/en/api/map.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ The main method to define route mappings for the router.
88

99
An object whose keys are paths and values are route config objects. For path matching rules, see [Route Matching](../route.html#route-matching).
1010

11+
### Returns
12+
13+
- The router instance itself.
14+
1115
### Route Config Object
1216

1317
A route config object can contain two fields:

docs/en/api/on.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ Add a single root-level route configuration. Internally, `router.map()` simply c
77
- `path: String` - see [Route Matching](../route.md#route-matching)
88
- `config: Object` - see [Route Config Object](map.md#route-config-object).
99

10+
### Returns
11+
12+
- The router instance itself.
13+
1014
### Example
1115

1216
``` js

docs/en/api/redirect.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ Configures global redirection rules for the router. Global redirections are perf
88

99
The redirect map object should be in the form of `{ fromPath: toPath, ... }`. The paths can contain dynamic segments.
1010

11+
### Returns
12+
13+
- The router instance itself.
14+
1115
### Example
1216

1317
``` js

0 commit comments

Comments
 (0)