import * as formatters from './tools/formatters'; import { PrinterLanguage } from './languages/base-printer-language'; type chunkType = formatters.empty | formatters.ruler | formatters.text | formatters.columns | formatters.grid | formatters.properties | formatters.image | formatters.imageRow | formatters.line; /** Default configuration for receipts */ export type ReceiptConfig = { /** Default width of the page in characters */ width: number; /** Default currency symbol */ currency: string; /** Default ruler character */ ruler: string; }; /** * Used to handle receipt generation. This is the legacy way of generating receipts. * Although it is still supported, the recommended way is to use {@link ReceiptTemplateGenerator} instead */ export declare class Receipt { private printer; /** Default configuration for receipts */ config: ReceiptConfig; /** Contains all the processors supported by the class */ processors: Record; constructor(printer: PrinterLanguage); /** Used to generate and return a string representation of the document. This document contains all * necessary commands for the printer to print the receipt. * @param chunks - An array of chunks from which to generate the document */ generate(chunks: Array): any; /** Used to generate and return a string representation of the document. This document contains all * necessary commands for the printer to print the receipt. * @param chunks - An array of chunks from which to generate the document */ generateAsync(chunks: Array): Promise; /** Used to bind a single processor to its corresponding function * @param name - The name of the processor * @param handler - The function to bind * @throws {@link Error} - If a processor with the same name already exists */ addProcessor(name: string, handler: Function): void; /** * Used to bind multiple processors to their corresponding functions * @param processors - An object containing the processors to add * @see addProcessor */ addProcessors(processors: Record): void; } export {};