diff --git a/react-router/index.d.ts b/react-router/index.d.ts
index 3faa19968d..040a9f3af7 100644
--- a/react-router/index.d.ts
+++ b/react-router/index.d.ts
@@ -48,12 +48,11 @@ declare module 'react-router' {
history: H.History;
}
- interface PartialRouteComponentProps
extends Partial> {
- }
+ interface PartialRouteComponentProps extends Partial> {}
interface RouteProps {
location?: H.Location;
- component?: React.SFC | void> | React.ComponentClass | void>;
+ component?: React.SFC | void> | React.ComponentClass | void>;
render?: (props: RouteComponentProps) => React.ReactNode;
children?: (props: RouteComponentProps) => React.ReactNode | React.ReactNode;
path?: string;
diff --git a/react-router/test/Recursive.tsx b/react-router/test/Recursive.tsx
index 53a600487f..748e00a968 100644
--- a/react-router/test/Recursive.tsx
+++ b/react-router/test/Recursive.tsx
@@ -19,15 +19,22 @@ const find = (id: number) => PEEPS.find(p => p.id == id)
const RecursiveExample = () => (
-
+
)
-interface PersonProps extends Partial> {
- match: match<{id: number}>;
+interface InitialPersonProps {
+ match: {
+ params: {
+ id: number;
+ };
+ url: string;
+ };
}
-const Person: React.SFC = ({ match }) => {
+type PersonProps = RouteComponentProps<{ id: number }>;
+
+const Person: React.SFC = ({ match }) => {
const person = find(match.params.id)
return (
@@ -42,9 +49,9 @@ const Person: React.SFC = ({ match }) => {
))}
-
+ }/>
)
}
-export default RecursiveExample
\ No newline at end of file
+export default RecursiveExample