UNPKG

react-epson-epos-sdk

Version:

React library for managing Epson printers with ePOS SDK support.

14 lines (13 loc) 640 B
export type PrinterHttpEndpoint = { printerIp: string; devId: string; useHttps: boolean; }; /** Stable key for the Epson `service.cgi` endpoint (same IP + devId share one gate). */ export declare function buildPrinterHttpGateKey({ printerIp, devId, useHttps }: PrinterHttpEndpoint): string; /** * Serializes every HTTP POST to the same printer endpoint. * Epson `service.cgi` accepts one request at a time; overlapping print jobs and * heartbeats otherwise produce short-lived canceled fetches in the browser. */ export declare function runSerializedPrinterHttp<T>(gateKey: string, operation: () => Promise<T>): Promise<T>;