Skip to content

Commit

Permalink
Add second arg to componentDidCatch to match React
Browse files Browse the repository at this point in the history
  • Loading branch information
pmkroeker committed Jun 13, 2019
1 parent a737df7 commit e8036de
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 @@ -94,7 +94,7 @@ declare namespace preact {
componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<S>, nextContext: any): void;
getSnapshotBeforeUpdate?(oldProps: Readonly<P>, oldState: Readonly<S>): any;
componentDidUpdate?(previousProps: Readonly<P>, previousState: Readonly<S>, snapshot: any): void;
componentDidCatch?(error: any): void;
componentDidCatch?(error: any, errorInfo: any): void;
}

abstract class Component<P, S> {
Expand Down

0 comments on commit e8036de

Please sign in to comment.