$ cnpm install @types/byte-size
npm install --save @types/byte-size
This package contains type definitions for byte-size (https://github.com/75lb/byte-size#readme).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/byte-size.
// Type definitions for byte-size 8.1
// Project: https://github.com/75lb/byte-size#readme
// Definitions by: lntel <https://github.com/lntel>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export interface ByteSizeOptions {
precision?: number;
units?: string;
customUnits?: object;
toStringFn?: () => string;
locale?: string | string[];
}
export interface ByteSizeResult {
value: string;
unit: string;
long: string;
toString: () => string;
}
declare function byteSize(bytes: number, options?: ByteSizeOptions): ByteSizeResult;
declare namespace byteSize {
function defaultOptions(options: ByteSizeOptions): void;
}
export default byteSize;
These definitions were written by lntel.
Copyright 2013 - present © cnpmjs.org | Home |