Skip to content
Source
Sign inSign up
TanStack/router

docs(router): correct ReturnType of `Router.matchRoute` to match the runtime output #3896

MergedRedbird10(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/3896/headmerged by SeanCassiere

Showing 1 changed file with 2 additions and 2 deletions.

x
0 of 1 viewed, 1 left
2 additions and 2 deletionsdocs/router/framework/react/api/router/RouterType.mdModified
View file
@@ -189,7 +189,7 @@
​
Matches a pathname and search params against the router's route tree and returns a route match's params or false if no match was found.
​
-- Type: `(dest: ToOptions, matchOpts?: MatchRouteOptions) => RouteMatch | false`
+- Type: `(dest: ToOptions, matchOpts?: MatchRouteOptions) => RouteMatch['params'] | false`
- Properties
- `dest`
- Type: `ToOptions`
@@ -200,7 +200,7 @@
- Optional
- Options that will be used to match the destination.
- Returns
- - A route match object if a match was found.
+ - A route match's params if a match was found.
- `false` if no match was found.
​
### `.dehydrate` method