Skip to content

Commit

Permalink
biome lint src --only suspicious/noConfusingVoidType (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrudd2 authored Feb 24, 2025
1 parent eb71bf0 commit d804244
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export async function startServer (port: number, hardware: Hardware = 'v3', com:
let clients: WebSocket[] = [];
let cancelRequested = false;
let unpaused: Promise<void> | null = null;
let signalUnpause: () => void | null = null;
let signalUnpause: (() => void) | null = null;
let motionIdx: number | null = null;
let currentPlan: Plan | null = null;
let plotting = false;
Expand Down
32 changes: 16 additions & 16 deletions src/ui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ interface DeviceInfo {
}

interface Driver {
onprogress: (motionIdx: number) => void | null;
oncancelled: () => void | null;
onfinished: () => void | null;
ondevinfo: (devInfo: DeviceInfo) => void | null;
onpause: (paused: boolean) => void | null;
onconnectionchange: (connected: boolean) => void | null;
onplan: (plan: Plan) => void | null;
onprogress: ((motionIdx: number) => void) | null;
oncancelled: (() => void) | null;
onfinished: (() => void) | null;
ondevinfo: ((devInfo: DeviceInfo) => void) | null;
onpause: ((paused: boolean) => void) | null;
onconnectionchange: ((connected: boolean) => void) | null;
onplan: ((plan: Plan) => void) | null;

plot(plan: Plan): void;

Expand All @@ -118,8 +118,8 @@ class WebSerialDriver implements Driver {
public onconnectionchange: (connected: boolean) => void;
public onplan: (plan: Plan) => void;

private _unpaused: Promise<void> = null;
private _signalUnpause: () => void = null;
private _unpaused: Promise<void> | null = null;
private _signalUnpause: (() => void) | null = null;
private _cancelRequested = false;

public static async connect(port?: SerialPort, hardware: Hardware = 'v3') {
Expand Down Expand Up @@ -232,13 +232,13 @@ class SaxiDriver implements Driver {
return d;
}

public onprogress: (motionIdx: number) => void | null;
public oncancelled: () => void | null;
public onfinished: () => void | null;
public ondevinfo: (devInfo: DeviceInfo) => void | null;
public onpause: (paused: boolean) => void | null;
public onconnectionchange: (connected: boolean) => void | null;
public onplan: (plan: Plan) => void | null;
public onprogress: ((motionIdx: number) => void) | null = null;
public oncancelled: (() => void) | null = null;
public onfinished: (() => void) | null = null;
public ondevinfo: ((devInfo: DeviceInfo) => void) | null = null;
public onpause: ((paused: boolean) => void) | null = null;
public onconnectionchange: ((connected: boolean) => void) | null = null;
public onplan: ((plan: Plan) => void) | null = null;

private socket: WebSocket;
private connected: boolean;
Expand Down

0 comments on commit d804244

Please sign in to comment.