import EscposGenerator from './ESCPOS'; const escposGenerator = new EscposGenerator(); import TSPLGenerator from './TSPL'; const tsplGenerator = new TSPLGenerator(); import getCurrentTime from './getDate'; const testOrder = (): Array | Array> => { (escposGenerator as any).init() .align(EscposGenerator.CENTER) .text('TEST') .newLine() .text('打印机连接成功') .newLine() .text(getCurrentTime()) .newLine(4) .cutPaper(EscposGenerator.CUT_PAPER_FULL, 0x80); return escposGenerator.toArray(); }; const testLabel = (): Array => { tsplGenerator.init(true) ._text('TEST', 1, 150, 60) ._text('打印机连接成功', 1, 90, 90) ._text(getCurrentTime(), 1, 60, 120) .setPrint(1); return tsplGenerator.getData(); }; export { testOrder, testLabel };