forked from componitable/format-number
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.d.ts
More file actions
25 lines (22 loc) · 668 Bytes
/
index.d.ts
File metadata and controls
25 lines (22 loc) · 668 Bytes
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
interface IFormatNumberOptions {
negativeType?: 'right' | 'left' | 'brackets' | 'none';
negativeLeftSymbol?: string;
negativeRightSymbol?: string;
negativeLeftOut?: boolean;
negativeRightOut?: boolean;
prefix?: string;
suffix?: string;
integerSeparator?: string;
decimalsSeparator?: string;
decimal?: string;
padLeft?: number;
padRight?: number;
round?: number;
truncate?: number;
}
interface IFormatNumberOverrideOptions {
noUnits?: boolean;
noSeparator?: boolean;
}
export default function formatter(options?: IFormatNumberOptions): format;
type format = (number: number, overrideOptions?: IFormatNumberOverrideOptions) => string;