Interface: PrinterTransport
Defined in: shared/peripherals/transport.ts:9
The seam every printer transport implements — WebUSB and raw TCP today, QZ Tray / Web Serial later. Transports move bytes; they never know about receipt content or ESC/POS dialects (that's the encoder's job).
Properties
connected
readonly connected: boolean;Defined in: shared/peripherals/transport.ts:11
kind
readonly kind: "webusb" | "network" | "qz";Defined in: shared/peripherals/transport.ts:10
Methods
close()
close(): Promise<void>;Defined in: shared/peripherals/transport.ts:13
Returns
Promise<void>
queryStatus()?
optional queryStatus(): Promise<PrinterStatus>;Defined in: shared/peripherals/transport.ts:19
Optional — only transports with a read channel implement it (TCP via DLE EOT today). Absence means "status unknowable", not "printer offline".
Returns
Promise<PrinterStatus>
write()
write(data: Uint8Array): Promise<void>;Defined in: shared/peripherals/transport.ts:12
Parameters
| Parameter | Type |
|---|---|
data | Uint8Array |
Returns
Promise<void>