mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-06 09:02:09 +08:00
[react] Add optional props type parameter to ReactType (#21322)
This commit is contained in:
committed by
John Reilly
parent
0e02e7b65b
commit
31ace05ea4
2
types/react/index.d.ts
vendored
2
types/react/index.d.ts
vendored
@@ -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