8.1.2 • Published 2 years ago

@types/byte-size v8.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Installation

npm install --save @types/byte-size

Summary

This package contains type definitions for byte-size (https://github.com/75lb/byte-size#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/byte-size.

index.d.ts

// 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;

Additional Details

  • Last updated: Tue, 14 Sep 2021 21:01:31 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by lntel.