From feae95f169c4892f7e525cbe9d7f677785c99210 Mon Sep 17 00:00:00 2001 From: Gary Roberts Date: Wed, 14 Sep 2016 09:03:34 +0100 Subject: [PATCH] Update react-router.d.ts Changed react-router RouteComponentProps comment to properly reflect routeParams resolving to type string (not number). As per documentation here: https://github.com/ReactTraining/react-router/blob/master/docs/API.md#routeparams --- react-router/react-router.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/react-router/react-router.d.ts b/react-router/react-router.d.ts index fb19dca42d..767cca1e2f 100644 --- a/react-router/react-router.d.ts +++ b/react-router/react-router.d.ts @@ -39,10 +39,10 @@ declare namespace ReactRouter { type RouteComponent = Component // use the following interface in an app code to get access to route param values, history, location... - // interface MyComponentProps extends ReactRouter.RouteComponentProps<{}, { id: number }> {} + // interface MyComponentProps extends ReactRouter.RouteComponentProps<{}, { id: string }> {} // somewhere in MyComponent // ... - // let id = this.props.routeParams.id + // let id = parseInt(this.props.routeParams.id, 10); // ... // this.props.history. ... // ...