-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
jsbarcode.d.ts
74 lines (66 loc) · 2.27 KB
/
jsbarcode.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
declare namespace JsBarcode {
interface BaseOptions {
width?: number;
height?: number;
format?: string;
displayValue?: boolean;
fontOptions?: string;
font?: string;
text?: string;
textAlign?: string;
textPosition?: string;
textMargin?: number;
fontSize?: number;
background?: string;
lineColor?: string;
margin?: number;
marginTop?: number;
marginBottom?: number;
marginLeft?: number;
marginRight?: number;
valid?: (valid: boolean) => void;
}
interface NodeOptions extends BaseOptions {
xmlDocument?: XMLDocument;
}
interface Code128Options extends BaseOptions {
ean128?: boolean;
}
interface Ean8Options extends BaseOptions {
flat?: boolean;
}
interface Ean13Options extends BaseOptions {
flat?: boolean;
lastChar?: string;
}
type Options = BaseOptions | Code128Options | Ean13Options | NodeOptions;
interface api {
options(options: Options): api;
blank(size: number): api;
init(options?: Options): void;
render(): void;
CODE39(value: string, options?: BaseOptions): api;
CODE128(value: string, options?: Code128Options): api;
CODE128A(value: string, options?: Code128Options): api;
CODE128B(value: string, options?: Code128Options): api;
CODE128C(value: string, options?: Code128Options): api;
EAN13(value: string, options?: Ean13Options): api;
EAN8(value: string, options?: Ean8Options): api;
EAN5(value: string, options?: BaseOptions): api;
EAN2(value: string, options?: BaseOptions): api;
UPC(value: string, options?: BaseOptions): api;
ITF14(value: string, options?: BaseOptions): api;
ITF(value: string, options?: BaseOptions): api;
MSI(value: string, options?: BaseOptions): api;
MSI10(value: string, options?: BaseOptions): api;
MSI11(value: string, options?: BaseOptions): api;
MSI1010(value: string, options?: BaseOptions): api;
MSI1110(value: string, options?: BaseOptions): api;
pharmacode(value: string, options?: BaseOptions): api;
codabar(value: string, options?: BaseOptions): api;
}
}
declare function JsBarcode(element: any): JsBarcode.api;
declare function JsBarcode(element: any, data: string, options?: JsBarcode.Options): void;
export = JsBarcode;
export as namespace JsBarcode;