Merge pull request #17025 from vbfox/patch-1

Allow false as a result of React render()
This commit is contained in:
John Reilly
2017-06-11 07:06:54 +01:00
committed by GitHub

View File

@@ -185,7 +185,7 @@ declare namespace React {
setState<K extends keyof S>(f: (prevState: S, props: P) => Pick<S, K>, callback?: () => any): void;
setState<K extends keyof S>(state: Pick<S, K>, callback?: () => any): void;
forceUpdate(callBack?: () => any): void;
render(): JSX.Element | null;
render(): JSX.Element | null | false;
// React.Props<T> is now deprecated, which means that the `children`
// property is not available on `P` by default, even though you can
@@ -2728,7 +2728,7 @@ declare global {
namespace JSX {
interface Element extends React.ReactElement<any> { }
interface ElementClass extends React.Component<any, any> {
render(): JSX.Element | null;
render(): JSX.Element | null | false;
}
interface ElementAttributesProperty { props: {}; }
interface ElementChildrenAttribute { children: {}; }