forked from autoNumeric/autoNumeric
-
Notifications
You must be signed in to change notification settings - Fork 1
/
typings.d.ts
41 lines (38 loc) · 1.19 KB
/
typings.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
interface AutoNumericOptions {
aSep?: string
dGroup?: number
aDec?: string
altDec?: string
aSign?: string
pSign?: "p" | "s"
vMin?: number
vMax?: number
mDec?: number
mRound?: "S" | "A" | "s" | "a" | "B" | "U" | "D" | "C" | "F" | "CHF"
aPad?: boolean
nBracket?: string
wEmpty?: "empty" | "zero" | "sign"
lZero?: "allow" | "deny" | "keep"
aForm?: boolean
anDefault?: string
}
interface Serialized {
name: string
value: string
}
type AutoNumericMethod = "init" | "destroy" | "update" | "set" | "get"
| "getString" | "getArray" | "getSettings"
interface JQuery {
autoNumeric(): JQuery
autoNumeric(options: AutoNumericOptions): JQuery
autoNumeric(method: AutoNumericMethod, options?: AutoNumericOptions): JQuery
| string | Serialized[] | AutoNumericOptions
autoNumeric(method: "init", options?: AutoNumericOptions): JQuery
autoNumeric(method: "destroy"): JQuery
autoNumeric(method: "update", options: AutoNumericOptions): JQuery
autoNumeric(method: "set", value: string): JQuery
autoNumeric(method: "get"): string
autoNumeric(method: "getString"): string
autoNumeric(method: "getArray"): Serialized[]
autoNumeric(method: "getSettings"): AutoNumericOptions
}