mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Update index.d.ts
Fixing compile errors that needs a a value for the generic State property in React.Component<Props, State>
This commit is contained in:
parent
00222e6b0a
commit
da620a35a3
4
types/enzyme/index.d.ts
vendored
4
types/enzyme/index.d.ts
vendored
@ -15,7 +15,7 @@ import { ReactElement, Component, HTMLAttributes as ReactHTMLAttributes, SVGAttr
|
||||
|
||||
export type HTMLAttributes = ReactHTMLAttributes<{}> & ReactSVGAttributes<{}>;
|
||||
|
||||
export class ElementClass extends Component<any> {
|
||||
export class ElementClass extends Component<any, any> {
|
||||
}
|
||||
|
||||
/* These are purposefully stripped down versions of React.ComponentClass and React.StatelessComponent.
|
||||
@ -23,7 +23,7 @@ export class ElementClass extends Component<any> {
|
||||
* all specified in the implementation. TS chooses the EnzymePropSelector overload and loses the generics
|
||||
*/
|
||||
export interface ComponentClass<Props> {
|
||||
new (props?: Props, context?: any): Component<Props>;
|
||||
new (props?: Props, context?: any): Component<Props, any>;
|
||||
}
|
||||
|
||||
export type StatelessComponent<Props> = (props: Props, context?: any) => JSX.Element;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user