[types/react] Fix regression with PropsWithChildren [The Travis build is lying] (#33462)

* Fix regression

* Update index.d.ts

* Update index.d.ts
This commit is contained in:
Vincent Langlet 2019-03-06 20:25:27 +01:00 committed by Nathan Shively-Sanders
parent 8740be3810
commit 4de5967e61

View File

@ -427,7 +427,7 @@ declare namespace React {
// always pass children as variadic arguments to `createElement`.
// In the future, if we can define its call signature conditionally
// on the existence of `children` in `P`, then we should remove this.
readonly props: Readonly<PropsWithChildren<P>>;
readonly props: Readonly<P> & Readonly<{ children?: ReactNode }>;
state: Readonly<S>;
/**
* @deprecated