UNPKG

@thi.ng/axidraw

Version:

Minimal AxiDraw plotter/drawing machine controller for Node.js

29 lines 826 B
import type { ISerial, SerialConnection } from "./api.js"; /** * Default connection using the actual serial port. */ export declare const SERIAL_PORT: SerialConnection; /** * Mock serial connection which uses a in-memory logger to record all draw * commands. Only intended for testing/dev purposes. */ export declare const MOCK_SERIAL: SerialConnection; /** * Minimal mock "serial port" implementation for testing purposes. Records all * sent messages into an internal string array for later analysis. */ export declare class MockSerial implements ISerial { sent: string[]; isClosed: boolean; /** * Clears internal log of "sent" message. */ clear(): void; close(): void; /** * Appends * @param msg */ write(msg: string): void; } //# sourceMappingURL=serial.d.ts.map