updated ts definition for v2.4.0 of 'bytes' package with missing options

This commit is contained in:
Laurens Rietveld
2016-07-01 14:10:29 +02:00
parent b2d754f53f
commit 56300b34b4
2 changed files with 13 additions and 6 deletions

13
bytes/bytes.d.ts vendored
View File

@@ -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.