mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 23:10:29 +00:00
[react] Add optional props type parameter to ReactType (#21322)
This commit is contained in:
committed by
John Reilly
parent
0e02e7b65b
commit
31ace05ea4
Vendored
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user