You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: react-router.d.ts
+18-17Lines changed: 18 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,7 @@ declare module ReactRouter {
67
67
*
68
68
* @param {Object} queryObject
69
69
*/
70
-
stringifyQuery?(queryObject: Object);
70
+
stringifyQuery?(queryObject: Object): string;
71
71
72
72
73
73
/**
@@ -82,12 +82,12 @@ declare module ReactRouter {
82
82
*
83
83
* @param {Error} error
84
84
*/
85
-
onError?(error: Error);
85
+
onError?(error: Error): void;
86
86
87
87
/**
88
88
* Called whenever the router updates its state in response to URL changes.
89
89
*/
90
-
onUpdate?();
90
+
onUpdate?(): void;
91
91
92
92
/**
93
93
* This is primarily for integrating with other libraries that need to participate in rendering before the route components are rendered. It defaults to render={(props) => <RouterContext {...props} />}.
@@ -165,7 +165,7 @@ declare module ReactRouter {
165
165
*
166
166
* @param {React.MouseEvent} event **NOTE** I'm assuming this will be a click event.
* Returns true or false depending on if the pathOrLoc is active. Will be true for every route in the route branch matched (child route is active, therefore parent is too), unless indexOnly is specified, in which case it will only match the exact path.
* Routes can be nested, this.props.children will contain the element created from the child route component. Please refer to the Route Configuration since this is a very critical part of the router's design.
0 commit comments