Skip to content

Commit 7f0e7e2

Browse files
authored
test(preact-query): add the 'override' modifier to test classes that override a base class member (#11910)
1 parent ec66fc3 commit 7f0e7e2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎packages/preact-query/src/__tests__/ErrorBoundary/ErrorBoundary.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export class ErrorBoundary extends Component<
3030
this.state = initialState
3131
}
3232

33-
static getDerivedStateFromError(error: Error) {
33+
static override getDerivedStateFromError(error: Error) {
3434
return { didCatch: true, error }
3535
}
3636

@@ -47,7 +47,7 @@ export class ErrorBoundary extends Component<
4747
}
4848
}
4949

50-
componentDidCatch(error: Error, info: ErrorInfo) {
50+
override componentDidCatch(error: Error, info: ErrorInfo) {
5151
/**
5252
* To emulate the react behavior of console.error
5353
* we add one here to show that the errors bubble up
@@ -57,7 +57,7 @@ export class ErrorBoundary extends Component<
5757
this.props.onError?.(error, info)
5858
}
5959

60-
componentDidUpdate(
60+
override componentDidUpdate(
6161
prevProps: ErrorBoundaryProps,
6262
prevState: ErrorBoundaryState,
6363
) {

0 commit comments

Comments
 (0)