diff --git a/types/react-router/index.d.ts b/types/react-router/index.d.ts index 384cb2289e..f1c24b778f 100644 --- a/types/react-router/index.d.ts +++ b/types/react-router/index.d.ts @@ -59,6 +59,7 @@ export interface RouteComponentProps
{ match: match
;
location: H.Location;
history: H.History;
+ staticContext?: any;
}
export interface RouteProps {
diff --git a/types/react-router/test/StaticRouter.tsx b/types/react-router/test/StaticRouter.tsx
new file mode 100644
index 0000000000..89999d84cb
--- /dev/null
+++ b/types/react-router/test/StaticRouter.tsx
@@ -0,0 +1,55 @@
+import * as React from 'react';
+import { StaticRouter, Route } from 'react-router-dom';
+
+interface StaticContext {
+ statusCode?: number;
+}
+
+interface RouteStatusProps {
+ statusCode: number;
+}
+
+const RouteStatus: React.SFC
+ Static context: {JSON.stringify(props.staticContext)}
+ Route with statusCode 404