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(typescript): extract type definitions from Router namespace #427

Merged
merged 2 commits into from
Feb 3, 2020
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
30 changes: 15 additions & 15 deletions analysis.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
},
{
"name": "route",
"type": "?Router.Route",
"type": "?Route",
"description": "(optional) The route object associated with `this` Web Component instance.\n\nThis property is defined in the `location` objects that are passed as\nparameters into Web Component lifecycle callbacks, and the `location`\nproperty set by Vaadin Router on the Web Components.\n\nThis property is undefined in the `location` objects that are available\nas `router.location`, and in the `location` that is included into the\nglobal router event details.",
"privacy": "public",
"sourceRange": {
Expand All @@ -126,7 +126,7 @@
},
{
"name": "routes",
"type": "!Array.<!Router.Route>",
"type": "!Array.<!Route>",
"description": "A list of route objects that match the current pathname. This list has\none element for each route that defines a parent layout, and then the\nelement for the route that defines the view.\n\nSee the **Getting Started** section of the\n[live demos](#/classes/Router/demos/demo/index.html) for more\ndetails on child routes and nested layouts.",
"privacy": "public",
"sourceRange": {
Expand All @@ -143,7 +143,7 @@
},
{
"name": "params",
"type": "!Router.IndexedParams",
"type": "!IndexedParams",
"description": "A bag of key-value pairs with parameters for the current location. Named\nparameters are available by name, unnamed ones - by index (e.g. for the\n`/users/:id` route the `:id` parameter is available as `location.params.id`).\n\nSee the **Route Parameters** section of the\n[live demos](#/classes/Router/demos/demo/index.html) for more\ndetails.",
"privacy": "public",
"sourceRange": {
Expand Down Expand Up @@ -178,7 +178,7 @@
"params": [
{
"name": "params",
"type": "Router.Params=",
"type": "Params=",
"description": "optional object with parameters to override.\nNamed parameters are passed by name (`params[name] = value`), unnamed\nparameters are passed by index (`params[index] = value`)."
}
],
Expand Down Expand Up @@ -476,7 +476,7 @@
},
{
"name": "ready",
"type": "!Promise.<!Router.Location>",
"type": "!Promise.<!RouterLocation>",
"description": "A promise that is settled after the current render cycle completes. If\nthere is no render cycle in progress the promise is immediately settled\nwith the last render cycle result.",
"privacy": "public",
"sourceRange": {
Expand All @@ -493,8 +493,8 @@
},
{
"name": "location",
"type": "!Router.Location",
"description": "Contains read-only information about the current router location:\npathname, active routes, parameters. See the\n[Location type declaration](#/classes/Router.Location)\nfor more details.",
"type": "!RouterLocation",
"description": "Contains read-only information about the current router location:\npathname, active routes, parameters. See the\n[Location type declaration](#/classes/RouterLocation)\nfor more details.",
"privacy": "public",
"sourceRange": {
"start": {
Expand Down Expand Up @@ -549,7 +549,7 @@
"params": [
{
"name": "routes",
"type": "(!Array.<!Router.Route> | !Router.Route)",
"type": "(!Array.<!Route> | !Route)",
"description": "a single route or an array of those"
},
{
Expand Down Expand Up @@ -1281,7 +1281,7 @@
},
{
"name": "params",
"type": "Router.Params=",
"type": "Params=",
"description": "Optional object with route path parameters.\nNamed parameters are passed by name (`params[name] = value`), unnamed\nparameters are passed by index (`params[index] = value`)."
}
],
Expand Down Expand Up @@ -1312,7 +1312,7 @@
},
{
"name": "params",
"type": "Router.Params=",
"type": "Params=",
"description": "Optional object with route path parameters.\nNamed parameters are passed by name (`params[name] = value`), unnamed\nparameters are passed by index (`params[index] = value`)."
}
],
Expand Down Expand Up @@ -1365,7 +1365,7 @@
"params": [
{
"name": "triggers",
"type": "...Router.NavigationTrigger",
"type": "...NavigationTrigger",
"rest": true
}
],
Expand Down Expand Up @@ -1449,7 +1449,7 @@
"params": [
{
"name": "location",
"description": "the `Router.Location` object"
"description": "the `RouterLocation` object"
},
{
"name": "commands",
Expand Down Expand Up @@ -1479,7 +1479,7 @@
"params": [
{
"name": "location",
"description": "the `Router.Location` object"
"description": "the `RouterLocation` object"
},
{
"name": "commands",
Expand Down Expand Up @@ -1509,7 +1509,7 @@
"params": [
{
"name": "location",
"description": "the `Router.Location` object"
"description": "the `RouterLocation` object"
},
{
"name": "commands",
Expand Down Expand Up @@ -1542,7 +1542,7 @@
"params": [
{
"name": "location",
"description": "the `Router.Location` object"
"description": "the `RouterLocation` object"
},
{
"name": "commands",
Expand Down
2 changes: 1 addition & 1 deletion demo/vaadin-router-navigation-trigger-demos.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h3>Navigation Triggers</h3>
Developers can define and use additional Navigation Triggers that are
specific to their application. A Navigation Trigger object must have
two methods: <code>activate()</code> to start listening on some UI events,
and <code>deactivate()</code> to stop.
and <code>inactivate()</code> to stop.
</p>

<h3><code>NavigationTrigger.POPSTATE</code></h3>
Expand Down
30 changes: 15 additions & 15 deletions docs/vaadin-router/analysis.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
},
{
"name": "route",
"type": "?Router.Route",
"type": "?Route",
"description": "(optional) The route object associated with `this` Web Component instance.\n\nThis property is defined in the `location` objects that are passed as\nparameters into Web Component lifecycle callbacks, and the `location`\nproperty set by Vaadin Router on the Web Components.\n\nThis property is undefined in the `location` objects that are available\nas `router.location`, and in the `location` that is included into the\nglobal router event details.",
"privacy": "public",
"sourceRange": {
Expand All @@ -126,7 +126,7 @@
},
{
"name": "routes",
"type": "!Array.<!Router.Route>",
"type": "!Array.<!Route>",
"description": "A list of route objects that match the current pathname. This list has\none element for each route that defines a parent layout, and then the\nelement for the route that defines the view.\n\nSee the **Getting Started** section of the\n[live demos](#/classes/Router/demos/demo/index.html) for more\ndetails on child routes and nested layouts.",
"privacy": "public",
"sourceRange": {
Expand All @@ -143,7 +143,7 @@
},
{
"name": "params",
"type": "!Router.IndexedParams",
"type": "!IndexedParams",
"description": "A bag of key-value pairs with parameters for the current location. Named\nparameters are available by name, unnamed ones - by index (e.g. for the\n`/users/:id` route the `:id` parameter is available as `location.params.id`).\n\nSee the **Route Parameters** section of the\n[live demos](#/classes/Router/demos/demo/index.html) for more\ndetails.",
"privacy": "public",
"sourceRange": {
Expand Down Expand Up @@ -178,7 +178,7 @@
"params": [
{
"name": "params",
"type": "Router.Params=",
"type": "Params=",
"description": "optional object with parameters to override.\nNamed parameters are passed by name (`params[name] = value`), unnamed\nparameters are passed by index (`params[index] = value`)."
}
],
Expand Down Expand Up @@ -476,7 +476,7 @@
},
{
"name": "ready",
"type": "!Promise.<!Router.Location>",
"type": "!Promise.<!RouterLocation>",
"description": "A promise that is settled after the current render cycle completes. If\nthere is no render cycle in progress the promise is immediately settled\nwith the last render cycle result.",
"privacy": "public",
"sourceRange": {
Expand All @@ -493,8 +493,8 @@
},
{
"name": "location",
"type": "!Router.Location",
"description": "Contains read-only information about the current router location:\npathname, active routes, parameters. See the\n[Location type declaration](#/classes/Router.Location)\nfor more details.",
"type": "!RouterLocation",
"description": "Contains read-only information about the current router location:\npathname, active routes, parameters. See the\n[Location type declaration](#/classes/RouterLocation)\nfor more details.",
"privacy": "public",
"sourceRange": {
"start": {
Expand Down Expand Up @@ -549,7 +549,7 @@
"params": [
{
"name": "routes",
"type": "(!Array.<!Router.Route> | !Router.Route)",
"type": "(!Array.<!Route> | !Route)",
"description": "a single route or an array of those"
},
{
Expand Down Expand Up @@ -1281,7 +1281,7 @@
},
{
"name": "params",
"type": "Router.Params=",
"type": "Params=",
"description": "Optional object with route path parameters.\nNamed parameters are passed by name (`params[name] = value`), unnamed\nparameters are passed by index (`params[index] = value`)."
}
],
Expand Down Expand Up @@ -1312,7 +1312,7 @@
},
{
"name": "params",
"type": "Router.Params=",
"type": "Params=",
"description": "Optional object with route path parameters.\nNamed parameters are passed by name (`params[name] = value`), unnamed\nparameters are passed by index (`params[index] = value`)."
}
],
Expand Down Expand Up @@ -1365,7 +1365,7 @@
"params": [
{
"name": "triggers",
"type": "...Router.NavigationTrigger",
"type": "...NavigationTrigger",
"rest": true
}
],
Expand Down Expand Up @@ -1449,7 +1449,7 @@
"params": [
{
"name": "location",
"description": "the `Router.Location` object"
"description": "the `RouterLocation` object"
},
{
"name": "commands",
Expand Down Expand Up @@ -1479,7 +1479,7 @@
"params": [
{
"name": "location",
"description": "the `Router.Location` object"
"description": "the `RouterLocation` object"
},
{
"name": "commands",
Expand Down Expand Up @@ -1509,7 +1509,7 @@
"params": [
{
"name": "location",
"description": "the `Router.Location` object"
"description": "the `RouterLocation` object"
},
{
"name": "commands",
Expand Down Expand Up @@ -1542,7 +1542,7 @@
"params": [
{
"name": "location",
"description": "the `Router.Location` object"
"description": "the `RouterLocation` object"
},
{
"name": "commands",
Expand Down
Loading