Initial commit
This commit is contained in:
23
types.ts
Normal file
23
types.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
export enum ViewMode {
|
||||
ASCII = 'ASCII',
|
||||
HEX = 'HEX'
|
||||
}
|
||||
|
||||
export interface SerialLogEntry {
|
||||
id: string;
|
||||
timestamp: Date;
|
||||
direction: 'TX' | 'RX';
|
||||
data: Uint8Array;
|
||||
}
|
||||
|
||||
// Minimal Web Serial API type definitions since they aren't in all TS configs yet
|
||||
export interface SerialPort {
|
||||
open(options: { baudRate: number }): Promise<void>;
|
||||
close(): Promise<void>;
|
||||
readable: ReadableStream<Uint8Array> | null;
|
||||
writable: WritableStream<Uint8Array> | null;
|
||||
}
|
||||
|
||||
export interface NavigatorSerial {
|
||||
requestPort(options?: { filters: any[] }): Promise<SerialPort>;
|
||||
}
|
||||
Reference in New Issue
Block a user