mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 21:00:01 +08:00
updated ts definition for v2.4.0 of 'bytes' package with missing options
This commit is contained in:
13
bytes/bytes.d.ts
vendored
13
bytes/bytes.d.ts
vendored
@@ -1,10 +1,15 @@
|
||||
// Type definitions for bytes v2.1.0
|
||||
// Type definitions for bytes v2.4.0
|
||||
// Project: https://github.com/visionmedia/bytes.js
|
||||
// Definitions by: Zhiyuan Wang <https://github.com/danny8002/>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare module 'bytes' {
|
||||
|
||||
interface BytesOptions {
|
||||
decimalPlaces?: number,
|
||||
thousandsSeparator?: string,
|
||||
unitSeparator?: string,
|
||||
fixedDecimals?: boolean
|
||||
}
|
||||
/**
|
||||
*Convert the given value in bytes into a string.
|
||||
*
|
||||
@@ -15,7 +20,7 @@ declare module 'bytes' {
|
||||
*
|
||||
* @returns {string}
|
||||
*/
|
||||
function bytes(value: number, options?: { thousandsSeparator: string }): string;
|
||||
function bytes(value: number, options?: BytesOptions): string;
|
||||
|
||||
/**
|
||||
*Parse string to an integer in bytes.
|
||||
@@ -37,7 +42,7 @@ declare module 'bytes' {
|
||||
* @param {BytesFormatOptions} [options]
|
||||
*/
|
||||
|
||||
function format(value: number, options?: { thousandsSeparator: string }): string;
|
||||
function format(value: number, options?: BytesOptions): string;
|
||||
|
||||
/**
|
||||
* Just return the input number value.
|
||||
|
||||
Reference in New Issue
Block a user