Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 9 additions & 23 deletions types/filesize.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export function filesize(arg: any, { bits, pad, base, round, locale, localeOptions, separator, spacer, symbols, standard, output, fullform, fullforms, exponent, roundingMethod, precision }?: {
export interface FileSizeOptions {
bits?: boolean;
pad?: boolean;
base?: number;
Expand All @@ -8,37 +8,23 @@ export function filesize(arg: any, { bits, pad, base, round, locale, localeOptio
separator?: string;
spacer?: string;
symbols?: {};
standard?: string;
output?: string;
standard?: 'iec' | 'jedec';
output?: 'array' | 'exponent' | 'object' | 'string';
fullform?: boolean;
fullforms?: any[];
exponent?: number;
roundingMethod?: string;
roundingMethod?: 'round' | 'floor' | 'ceil';
precision?: number;
}): string | number | any[] | {
}

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[] | {
value: any;
symbol: any;
exponent: number;
unit: string;
};
export function partial({ bits, pad, base, round, locale, localeOptions, separator, spacer, symbols, standard, output, fullform, fullforms, exponent, roundingMethod, precision }?: {
bits?: boolean;
pad?: boolean;
base?: number;
round?: number;
locale?: string;
localeOptions?: {};
separator?: string;
spacer?: string;
symbols?: {};
standard?: string;
output?: string;
fullform?: boolean;
fullforms?: any[];
exponent?: number;
roundingMethod?: string;
precision?: number;
}): (arg: any) => string | number | any[] | {

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[] | {
value: any;
symbol: any;
exponent: number;
Expand Down