-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
44 lines (44 loc) · 1.26 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/// <reference types="node" />
export declare enum MediaType {
None = 0,
ContinuousTape = 1,
DieCutLabels = 2
}
export declare namespace Status {
interface Media {
type: MediaType;
width: number;
length: number;
}
enum Type {
ReplyToStatusRequest = 0,
PrintingCompleted = 1,
ErrorOccurred = 2,
Notification = 3,
PhaseChange = 4
}
interface Response {
model: string;
statusType: Type;
error: string[];
media: Media;
}
}
export declare class Printer {
readonly debugMode: boolean;
private readonly printerInterface;
private readonly input;
private readonly output;
private statusHandlers;
private removeStatusHandler;
constructor(debugMode?: boolean);
init(): Promise<void>;
private parseStatusResponse;
private transfer;
getStatus(): Promise<Status.Response>;
print(rasterLines: Buffer[], status?: Status.Response): Promise<Status.Response>;
printRawImageBuffer(render: Buffer, width: number): Promise<Status.Response>;
private font;
useFont(name: string, path?: string): void;
printText(primary: string, secondary?: string): Promise<Status.Response>;
}