mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 15:00:26 +00:00
Update index.d.ts
Fixes
```bash
client/components/controllers/Notes.tsx(199,13): error TS2605: JSX element type 'Component<OwnProps, {} | void>' 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
This commit is contained in:
Vendored
+1
-1
@@ -2345,7 +2345,7 @@ declare global {
|
||||
namespace JSX {
|
||||
interface Element extends React.ReactElement<any> { }
|
||||
interface ElementClass extends React.Component<any, any> {
|
||||
render(): JSX.Element;
|
||||
render(): JSX.Element|null;
|
||||
}
|
||||
interface ElementAttributesProperty { props: {}; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user