From f487a1c111ae2446bb502eef8f65aca3eb41b684 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Richard=20Jedli=C4=8Dka?= Date: Tue, 17 Oct 2017 20:58:39 +0200 Subject: [PATCH] [react] Fix `isValidElement` to accept `any` type (#20641) * [react] Fix `isValidElement` to accept `any` type * [react] Fix `isValidElement` method param type Change `object` parameter type from `any` to more explicit. --- types/react/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react/index.d.ts b/types/react/index.d.ts index 4b123ecd87..35feb8d0ab 100644 --- a/types/react/index.d.ts +++ b/types/react/index.d.ts @@ -256,7 +256,7 @@ declare namespace React { props?: Q, // should be Q & Attributes ...children: ReactNode[]): ReactElement

; - function isValidElement

(object: {}): object is ReactElement

; + function isValidElement

(object: {} | null | undefined): object is ReactElement

; const Children: ReactChildren; const version: string;