forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jquery.qrcode.d.ts
127 lines (105 loc) · 2.63 KB
/
jquery.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
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
// Type definitions for jQuery.qrcode v0.12.0
// Project: https://github.com/lrsjng/jquery-qrcode
// Definitions by: Dan Manastireanu <https://github.com/danmana>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts" />
declare module JQueryQRCode {
/**
* One of the possible mode types.
*/
export const enum Mode {
NORMAL,
LABEL_STRIP,
LABEL_BOX,
IMAGE_STRIP,
IMAGE_BOX
}
interface Options {
/**
* Render method: 'canvas', 'image' or 'div'
* @default 'canvas'
*/
render?: string,
/**
* Start of version range, somewhere in 1 .. 40
* @default 1
*/
minVersion?: number,
/**
* End of version range, somewhere in 1 .. 40
* @default 40
*/
maxVersion?: number,
/**
* Error correction level: 'L', 'M', 'Q' or 'H'
* @default 'L'
*/
ecLevel?: string,
/**
* Left offset in pixels, if drawn onto existing canvas
* @default 0
*/
left?: number,
/**
* Top offset in pixels, if drawn onto existing canvas
* @default 0
*/
top?: number,
/**
* Size in pixel
* @default 200
*/
size?: number,
/**
* Code color or image element
* @default '#000'
*/
fill?: string,
/**
* Background color or image element, null for transparent background
* @default null
*/
background?: string,
/**
* The text content of the QR code.
* @default 'no text'
*/
text?: string,
/**
* Corner radius relative to module width: 0.0 .. 0.5
* @default 0
*/
radius?: number,
/**
* Quiet zone in modules
* @default 0
*/
quiet?: number,
/**
* Mode
* @default Mode.NORMAL
*/
mode?: Mode,
/** @default 0.1 */
mSize?: number,
/** @default 0.5 */
mPosX?: number,
/** @default 0.5 */
mPosY?: number,
/** @default 'no label' */
label?: string,
/** @default 'sans' */
fontname?: string,
/** @default '#000' */
fontcolor?: string,
/** @default null */
image?: string
}
}
interface JQuery {
/**
* Create a QR Code inside the selected container.
* @param options
*/
qrcode(options?: JQueryQRCode.Options): JQuery;
}