mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-13 12:37:16 +08:00
Allow pass ComponentClass state to StaticLifecycle (#27417)
* Update index.d.ts * set default state to empty object * use S instead ComponentState * defaults to ComponentState
This commit is contained in:
4
types/react/index.d.ts
vendored
4
types/react/index.d.ts
vendored
@@ -354,8 +354,8 @@ declare namespace React {
|
||||
displayName?: string;
|
||||
}
|
||||
|
||||
interface ComponentClass<P = {}> extends StaticLifecycle<P, any> {
|
||||
new (props: P, context?: any): Component<P, ComponentState>;
|
||||
interface ComponentClass<P = {}, S = ComponentState> extends StaticLifecycle<P, S> {
|
||||
new (props: P, context?: any): Component<P, S>;
|
||||
propTypes?: ValidationMap<P>;
|
||||
contextTypes?: ValidationMap<any>;
|
||||
childContextTypes?: ValidationMap<any>;
|
||||
|
||||
Reference in New Issue
Block a user