[react] Add optional props type parameter to ReactType (#21322)

This commit is contained in:
Tom Crockett
2017-11-07 22:23:11 +00:00
committed by John Reilly
parent 0e02e7b65b
commit 31ace05ea4

View File

@@ -71,7 +71,7 @@ declare namespace React {
// React Elements
// ----------------------------------------------------------------------
type ReactType = string | ComponentType<any>;
type ReactType<P = any> = string | ComponentType<P>;
type ComponentType<P = {}> = ComponentClass<P> | StatelessComponent<P>;
type Key = string | number;