[react-router-config] Fix error when "strictFunctionTypes" is on (#30460)

This commit is contained in:
NullMDR
2018-11-12 18:16:27 +00:00
committed by John Reilly
parent 7e0a27458d
commit bfc7007118
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -1,7 +1,8 @@
// Type definitions for react-router-config 1.0
// Type definitions for react-router-config 1.1
// Project: https://github.com/ReactTraining/react-router/tree/master/packages/react-router-config
// Definitions by: François Nguyen <https://github.com/lith-light-g>
// John Reilly <https://github.com/johnnyreilly>
// Phoenix He <https://github.com/NullMDR>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
@@ -15,7 +16,7 @@ export interface RouteConfigComponentProps<Params extends { [K in keyof Params]?
export interface RouteConfig {
location?: Location;
component?: React.ComponentType<RouteConfigComponentProps<any> | {}>;
component?: React.ComponentType<RouteConfigComponentProps<any>> | React.ComponentType;
path?: string;
exact?: boolean;
strict?: boolean;
+1 -1
View File
@@ -8,7 +8,7 @@
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": false,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"