From 32e719c7015a20ba92b1e7e53095fd2abfcea0ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benoit=20B=C3=A9n=C3=A9zech?= Date: Sat, 13 Aug 2016 20:45:26 +0200 Subject: [PATCH] Update index.d.ts Fixes ```bash client/components/controllers/Notes.tsx(199,13): error TS2605: JSX element type 'Component' is not a constructor function for JSX elements. Types of property 'render' are incompatible. Type '() => Element | null' is not assignable to type '() => Element'. Type 'Element | null' is not assignable to type 'Element'. Type 'null' is not assignable to type 'Element'. ``` rendering `null` is acceptable and should be accepted. See https://github.com/Microsoft/TypeScript/issues/10259 --- react/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react/index.d.ts b/react/index.d.ts index 0fc797bb2a..7449d1e9c6 100644 --- a/react/index.d.ts +++ b/react/index.d.ts @@ -2345,7 +2345,7 @@ declare global { namespace JSX { interface Element extends React.ReactElement { } interface ElementClass extends React.Component { - render(): JSX.Element; + render(): JSX.Element|null; } interface ElementAttributesProperty { props: {}; }