Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compat PureComponent parity with upstream react type definitions #4056

Merged
merged 2 commits into from
Nov 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compat/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ declare namespace React {
component: preact.Component | Element
): Element | null;

export abstract class PureComponent<P = {}, S = {}> extends preact.Component<
export abstract class PureComponent<P = {}, S = {}, SS = any> extends preact.Component<
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we then also accept this on Component to orchestrate typings for getSnapshotBeforeUpdate as React does

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I actually have no idea about any of that as I'm pretty new to using React/Preact, just thought I'd contribute a fix to get Blueprint working since it's just a small issue with types.

P,
S
> {
Expand Down