-
Notifications
You must be signed in to change notification settings - Fork 1
/
h-qrcode.d.ts
46 lines (38 loc) · 990 Bytes
/
h-qrcode.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
// heavilly inspired by https://github.com/davidshimjs/qrcodejs/pull/134/commits/d6b51e6596897338fb91ea2113514b06328b3be1
declare module 'h-qrcode' {
export class QRCode {
constructor(containingElement: HTMLElement, config?: QRCodeConfig);
static CorrectLevel: CorrectLevel;
clear(): void;
makeCode(text: string);
makeImage();
}
const enum ColorPreset {
Zero = 0,
One,
Two,
Three,
Four,
Five,
}
interface QRCodeConfig {
text?: string;
width?: number;
height?: number;
colorDark?: string;
colorLight?: string;
correctLevel?: number;
typeNumber?: number;
isDotted?: boolean,
dotColors?: string[],
colorful?: boolean,
usePreset?: ColorPreset,
}
interface CorrectLevel {
L: number;
M: number;
Q: number;
H: number;
}
export default QRCode;
}