1
- export function filesize ( arg : any , { bits , pad , base , round , locale , localeOptions , separator , spacer , symbols , standard , output , fullform , fullforms , exponent , roundingMethod , precision } ?: {
1
+ export interface FileSizeOptions {
2
2
bits ?: boolean ;
3
3
pad ?: boolean ;
4
4
base ?: number ;
@@ -8,37 +8,23 @@ export function filesize(arg: any, { bits, pad, base, round, locale, localeOptio
8
8
separator ?: string ;
9
9
spacer ?: string ;
10
10
symbols ?: { } ;
11
- standard ?: string ;
12
- output ?: string ;
11
+ standard ?: 'iec' | 'jedec' ;
12
+ output ?: 'array' | 'exponent' | 'object' | ' string' ;
13
13
fullform ?: boolean ;
14
14
fullforms ?: any [ ] ;
15
15
exponent ?: number ;
16
- roundingMethod ?: string ;
16
+ roundingMethod ?: 'round' | 'floor' | 'ceil' ;
17
17
precision ?: number ;
18
- } ) : string | number | any [ ] | {
18
+ }
19
+
20
+ export function filesize ( arg : any , { bits, pad, base, round, locale, localeOptions, separator, spacer, symbols, standard, output, fullform, fullforms, exponent, roundingMethod, precision } ?: FileSizeOptions ) : string | number | any [ ] | {
19
21
value : any ;
20
22
symbol : any ;
21
23
exponent : number ;
22
24
unit : string ;
23
25
} ;
24
- export function partial ( { bits, pad, base, round, locale, localeOptions, separator, spacer, symbols, standard, output, fullform, fullforms, exponent, roundingMethod, precision } ?: {
25
- bits ?: boolean ;
26
- pad ?: boolean ;
27
- base ?: number ;
28
- round ?: number ;
29
- locale ?: string ;
30
- localeOptions ?: { } ;
31
- separator ?: string ;
32
- spacer ?: string ;
33
- symbols ?: { } ;
34
- standard ?: string ;
35
- output ?: string ;
36
- fullform ?: boolean ;
37
- fullforms ?: any [ ] ;
38
- exponent ?: number ;
39
- roundingMethod ?: string ;
40
- precision ?: number ;
41
- } ) : ( arg : any ) => string | number | any [ ] | {
26
+
27
+ export function partial ( { bits, pad, base, round, locale, localeOptions, separator, spacer, symbols, standard, output, fullform, fullforms, exponent, roundingMethod, precision } ?: FileSizeOptions ) : ( arg : any ) => string | number | any [ ] | {
42
28
value : any ;
43
29
symbol : any ;
44
30
exponent : number ;
0 commit comments