Skip to content

Commit

Permalink
Prettier fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
microbit-matt-hillsdon committed Jul 15, 2024
1 parent 575a3c1 commit 10117fa
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions lib/bluetooth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export class MicrobitWebBluetoothConnection
this.connection = await createBluetoothDeviceWrapper(
device,
this.logging,
(type, event) => this.dispatchTypedEvent(type, event)
(type, event) => this.dispatchTypedEvent(type, event),
);
}
// TODO: timeout unification?
Expand All @@ -170,7 +170,7 @@ export class MicrobitWebBluetoothConnection
}

private async chooseDevice(
options: ConnectOptions
options: ConnectOptions,
): Promise<BluetoothDevice | undefined> {
if (this.device) {
return this.device;
Expand Down Expand Up @@ -202,7 +202,7 @@ export class MicrobitWebBluetoothConnection
],
}),
new Promise<"timeout">((resolve) =>
setTimeout(() => resolve("timeout"), requestDeviceTimeoutDuration)
setTimeout(() => resolve("timeout"), requestDeviceTimeoutDuration),
),
]);
if (result === "timeout") {
Expand Down
2 changes: 1 addition & 1 deletion lib/device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export interface DeviceConnection
* The partial parameter reports the flash type currently in progress.
*/
progress: (percentage: number | undefined, partial: boolean) => void;
}
},
): Promise<void>;

/**
Expand Down
16 changes: 8 additions & 8 deletions lib/usb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,14 @@ export class MicrobitWebUSBConnection
}
}, assumePageIsStayingOpenDelay);
},
{ once: true }
{ once: true },
);
};

private logging: Logging;

constructor(
options: MicrobitWebUSBConnectionOptions = { logging: new NullLogging() }
options: MicrobitWebUSBConnectionOptions = { logging: new NullLogging() },
) {
super();
this.logging = options.logging;
Expand All @@ -150,7 +150,7 @@ export class MicrobitWebUSBConnection
if (window.document) {
window.document.addEventListener(
"visibilitychange",
this.visibilityChangeListener
this.visibilityChangeListener,
);
}
}
Expand All @@ -165,7 +165,7 @@ export class MicrobitWebUSBConnection
if (window.document) {
window.document.removeEventListener(
"visibilitychange",
this.visibilityChangeListener
this.visibilityChangeListener,
);
}
}
Expand All @@ -187,13 +187,13 @@ export class MicrobitWebUSBConnection
options: {
partial: boolean;
progress: (percentage: number | undefined) => void;
}
},
): Promise<void> {
this.flashing = true;
try {
const startTime = new Date().getTime();
await this.withEnrichedErrors(() =>
this.flashInternal(dataSource, options)
this.flashInternal(dataSource, options),
);
this.dispatchTypedEvent("flash", new FlashEvent());

Expand All @@ -215,7 +215,7 @@ export class MicrobitWebUSBConnection
options: {
partial: boolean;
progress: (percentage: number | undefined, partial: boolean) => void;
}
},
): Promise<void> {
this.log("Stopping serial before flash");
await this.stopSerialInternal();
Expand Down Expand Up @@ -327,7 +327,7 @@ export class MicrobitWebUSBConnection
// Log error to console for feedback
this.log("An error occurred whilst attempting to use WebUSB.");
this.log(
"Details of the error can be found below, and may be useful when trying to replicate and debug the error."
"Details of the error can be found below, and may be useful when trying to replicate and debug the error.",
);
this.log(e);

Expand Down

0 comments on commit 10117fa

Please sign in to comment.