mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 13:00:19 +00:00
Fix #11566 allows SFC to return null
This commit is contained in:
Vendored
+4
-2
@@ -201,7 +201,7 @@ declare namespace React {
|
||||
|
||||
type SFC<P> = StatelessComponent<P>;
|
||||
interface StatelessComponent<P> {
|
||||
(props: P & { children?: ReactNode }, context?: any): ReactElement<any>;
|
||||
(props: P & { children?: ReactNode }, context?: any): ReactElement<any> | null;
|
||||
propTypes?: ValidationMap<P>;
|
||||
contextTypes?: ValidationMap<any>;
|
||||
defaultProps?: P;
|
||||
@@ -2620,7 +2620,9 @@ declare namespace React {
|
||||
|
||||
declare global {
|
||||
namespace JSX {
|
||||
interface Element extends React.ReactElement<any> { }
|
||||
interface JSXElement extends React.ReactElement<any> { }
|
||||
type Element = JSXElement | null;
|
||||
|
||||
interface ElementClass extends React.Component<any, any> {
|
||||
render(): JSX.Element | null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user