UNPKG

webzlp

Version:

A small library using WebUSB to print labels on label printers.

30 lines 1.34 kB
import { PrinterConfig } from './PrinterConfig.js'; import { OffsetCommand } from './BasicCommands.js'; import { CommandEffectFlags } from './Commands.js'; import * as Util from '../Util/index.js'; import * as Conf from '../Configs/index.js'; /** Interface of document state effects carried between individual commands. */ export interface TranspiledDocumentState { horizontalOffset: number; verticalOffset: number; lineSpacingDots: number; /** The read-only config at the start of the transpile operation */ initialConfig: PrinterConfig; margin: { leftChars: number; rightChars: number; }; printWidth: number; characterSize: Conf.Coordinate; commandEffectFlags: CommandEffectFlags; } /** Apply an offset command to a document. */ export declare function applyOffsetToDocState(cmd: OffsetCommand, outDoc: TranspiledDocumentState): void; export declare function getNewTranspileState(config: PrinterConfig): TranspiledDocumentState; /** Represents an error when validating a document against a printer's capabilities. */ export declare class TranspileDocumentError extends Util.WebZlpError { private _innerErrors; get innerErrors(): TranspileDocumentError[]; constructor(message: string, innerErrors?: TranspileDocumentError[]); } //# sourceMappingURL=TranspileCommand.d.ts.map