Skip to content

Commit

Permalink
TypeScript fix
Browse files Browse the repository at this point in the history
  • Loading branch information
microbit-robert committed May 3, 2024
1 parent 10b772a commit 9bf35cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
12 changes: 3 additions & 9 deletions src/project/project-actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -875,9 +875,7 @@ export class ProjectActions {
this.save(finalFocusRef, true);
}

private async handleClearConnectError(
finalFocusRef: React.RefObject<HTMLButtonElement>
) {
private async handleClearConnectError(finalFocusRef: FinalFocusRef) {
return this.dialogs.show<void>((callback) => (
<WebUSBErrorDialog
callback={callback}
Expand All @@ -897,9 +895,7 @@ export class ProjectActions {
/>
));
}
private async handleReconnectMicrobitError(
finalFocusRef: React.RefObject<HTMLButtonElement>
) {
private async handleReconnectMicrobitError(finalFocusRef: FinalFocusRef) {
return this.dialogs.show<void>((callback) => (
<WebUSBErrorDialog
callback={callback}
Expand All @@ -910,9 +906,7 @@ export class ProjectActions {
));
}

private async handleTimeoutError(
finalFocusRef: React.RefObject<HTMLButtonElement>
) {
private async handleTimeoutError(finalFocusRef: FinalFocusRef) {
return this.dialogs.show<void>((callback) => (
<WebUSBErrorDialog
callback={callback}
Expand Down
3 changes: 2 additions & 1 deletion src/workbench/connect-dialogs/WebUSBErrorDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ import { HStack, Text, VStack } from "@chakra-ui/react";
import { ReactNode, useCallback } from "react";
import { FormattedMessage } from "react-intl";
import { GenericDialog } from "../../common/GenericDialog";
import { FinalFocusRef } from "../../project/project-actions";

interface WebUSBErrorDialogProps {
callback: () => void;
finalFocusRef: React.RefObject<HTMLButtonElement>;
finalFocusRef: FinalFocusRef;
title: ReactNode;
description: ReactNode;
}
Expand Down

0 comments on commit 9bf35cd

Please sign in to comment.