Skip to content

Commit

Permalink
Merge pull request #4479 from preactjs/fix/any-component-type
Browse files Browse the repository at this point in the history
fix: `AnyComponent` type to support classes
  • Loading branch information
rschristian authored Aug 23, 2024
2 parents 2c6df95 + 84f1083 commit 8e8dd92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export interface ComponentConstructor<P = {}, S = {}>
// Type alias for a component instance considered generally, whether stateless or stateful.
export type AnyComponent<P = {}, S = {}> =
| FunctionComponent<P>
| Component<P, S>;
| ComponentConstructor<P, S>;

export interface Component<P = {}, S = {}> {
componentWillMount?(): void;
Expand Down

0 comments on commit 8e8dd92

Please sign in to comment.