mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 15:50:13 +00:00
Merge pull request #17025 from vbfox/patch-1
Allow false as a result of React render()
This commit is contained in:
4
types/react/index.d.ts
vendored
4
types/react/index.d.ts
vendored
@@ -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: {}; }
|
||||
|
||||
Reference in New Issue
Block a user