From bfc700711858ddeca6afa907145063a9474bbf37 Mon Sep 17 00:00:00 2001 From: NullMDR Date: Tue, 13 Nov 2018 02:16:27 +0800 Subject: [PATCH] [react-router-config] Fix error when "strictFunctionTypes" is on (#30460) --- types/react-router-config/index.d.ts | 5 +++-- types/react-router-config/tsconfig.json | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/types/react-router-config/index.d.ts b/types/react-router-config/index.d.ts index a445e17200..5ca3cfee1a 100644 --- a/types/react-router-config/index.d.ts +++ b/types/react-router-config/index.d.ts @@ -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 // John Reilly +// Phoenix He // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -15,7 +16,7 @@ export interface RouteConfigComponentProps | {}>; + component?: React.ComponentType> | React.ComponentType; path?: string; exact?: boolean; strict?: boolean; diff --git a/types/react-router-config/tsconfig.json b/types/react-router-config/tsconfig.json index 49ab50e7b0..966a0dd37d 100644 --- a/types/react-router-config/tsconfig.json +++ b/types/react-router-config/tsconfig.json @@ -8,7 +8,7 @@ "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, - "strictFunctionTypes": false, + "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ "../"