forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
numeraljs.d.ts
49 lines (43 loc) · 1.13 KB
/
numeraljs.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
// Type definitions for Numeral.js
// Project: https://github.com/adamwdraper/Numeral-js
// Definitions by: Vincent Bortone <https://github.com/vbortone/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface NumeralJSLanguage {
delimiters: {
thousands: string;
decimal: string;
};
abbreviations: {
thousand: string;
million: string;
billion: string;
trillion: string;
};
ordinal(num: number): string;
currency: {
symbol: string;
};
}
interface Numeral {
(value?: any): Numeral;
version: string;
isNumeral: boolean;
language(key: string, values?: NumeralJSLanguage): Numeral;
zeroFormat(format: string): string;
clone(): Numeral;
format(inputString?: string): string;
formatCurrency(inputString?: string): string;
unformat(inputString: string): number;
value(): number;
valueOf(): number;
set (value: any): Numeral;
add(value: any): Numeral;
subtract(value: any): Numeral;
multiply(value: any): Numeral;
divide(value: any): Numeral;
difference(value: any): number;
}
declare var numeral: Numeral;
declare module "numeral" {
export = numeral;
}