Skip to content
Closed
Show file tree
Hide file tree
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 types/react/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ declare namespace React {
* Catches exceptions generated in descendant components. Unhandled exceptions will cause
* the entire component tree to unmount.
*/
componentDidCatch?(error: Error, errorInfo: ErrorInfo): void;
componentDidCatch?(error: unknown, errorInfo: ErrorInfo): void;
}

// Unfortunately, we have no way of declaring that the component constructor must implement this
Expand Down
2 changes: 1 addition & 1 deletion types/react/v16/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ declare namespace React {
* Catches exceptions generated in descendant components. Unhandled exceptions will cause
* the entire component tree to unmount.
*/
componentDidCatch?(error: Error, errorInfo: ErrorInfo): void;
componentDidCatch?(error: unknown, errorInfo: ErrorInfo): void;
}

// Unfortunately, we have no way of declaring that the component constructor must implement this
Expand Down
2 changes: 1 addition & 1 deletion types/react/v17/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ declare namespace React {
* Catches exceptions generated in descendant components. Unhandled exceptions will cause
* the entire component tree to unmount.
*/
componentDidCatch?(error: Error, errorInfo: ErrorInfo): void;
componentDidCatch?(error: unknown, errorInfo: ErrorInfo): void;
}

// Unfortunately, we have no way of declaring that the component constructor must implement this
Expand Down