declare module "human-format" { export type BinaryPrefix = | "" | "Ki" | "Mi" | "Gi" | "Ti" | "Pi" | "Ei" | "Zi" | "Yi"; export type SIPrefix = | "y" | "z" | "a" | "f" | "p" | "n" | "ยต" | "m" | "" | "k" | "M" | "G" | "T" | "P" | "E" | "Z" | "Y"; export type ScaleName = "binary" | "SI"; export type ScaleLike = Scale | ScaleName; export type Prefix = TScale extends Scale< infer TPrefix > ? TPrefix : TScale extends "binary" ? BinaryPrefix : TScale extends "SI" ? SIPrefix : never; export interface Options { maxDecimals?: number | "auto"; separator?: string; unit?: string; scale?: TScale; strict?: boolean; prefix?: Prefix; decimals?: number; } export interface Info { value: number; prefix: Prefix; unit?: string; } export interface ParsedInfo { value: number; factor: number; prefix: Prefix; unit?: string; } export class Scale { constructor(prefixes: Record); static create( prefixes: TPrefix[], base: number, initExp?: number ): Scale; findPrefix(value: number): { factor: number; prefix: TPrefix }; parse( str: string, strict?: boolean ): ParsedInfo; } interface HumanFormat { ( value: number, options?: Options ): string; bytes( value: number, options?: Options ): string; parse: { ( str: string, options?: Options ): number; raw( str: string, strict?: boolean ): ParsedInfo; }; raw( value: number, options?: Options ): Info; Scale: typeof Scale; } const humanFormat: HumanFormat; export = humanFormat; }