Skip to content

Commit 8526ad0

Browse files
committed
fixup: Add interface for filesize options object
Will allow casting to the options shape
1 parent 57ffb51 commit 8526ad0

File tree

1 file changed

+6
-20
lines changed

1 file changed

+6
-20
lines changed

types/filesize.d.ts

+6-20
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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 {
22
bits?: boolean;
33
pad?: boolean;
44
base?: number;
@@ -15,30 +15,16 @@ export function filesize(arg: any, { bits, pad, base, round, locale, localeOptio
1515
exponent?: number;
1616
roundingMethod?: string;
1717
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[] | {
1921
value: any;
2022
symbol: any;
2123
exponent: number;
2224
unit: string;
2325
};
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[] | {
4228
value: any;
4329
symbol: any;
4430
exponent: number;

0 commit comments

Comments
 (0)