mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
Unwrap all lone ambient external modules
This commit is contained in:
91
bytes/bytes.d.ts
vendored
91
bytes/bytes.d.ts
vendored
@@ -3,60 +3,59 @@
|
||||
// Definitions by: Zhiyuan Wang <https://github.com/danny8002/>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare module 'bytes' {
|
||||
|
||||
|
||||
/**
|
||||
*Convert the given value in bytes into a string.
|
||||
*
|
||||
* @param {number} value
|
||||
* @param {{
|
||||
* thousandsSeparator: [string]
|
||||
* }} [options] bytes options.
|
||||
*
|
||||
* @returns {string}
|
||||
*/
|
||||
declare function bytes(value: number, options?: { thousandsSeparator: string }): string;
|
||||
|
||||
/**
|
||||
*Parse string to an integer in bytes.
|
||||
*
|
||||
* @param {string} value
|
||||
* @returns {number}
|
||||
*/
|
||||
declare function bytes(value: string): number;
|
||||
|
||||
declare namespace bytes {
|
||||
|
||||
/**
|
||||
*Convert the given value in bytes into a string.
|
||||
* Format the given value in bytes into a string.
|
||||
*
|
||||
* If the value is negative, take Math.abs(). If it is a float,
|
||||
* it is rounded.
|
||||
*
|
||||
* @param {number} value
|
||||
* @param {{
|
||||
* thousandsSeparator: [string]
|
||||
* }} [options] bytes options.
|
||||
*
|
||||
* @returns {string}
|
||||
* @param {BytesFormatOptions} [options]
|
||||
*/
|
||||
function bytes(value: number, options?: { thousandsSeparator: string }): string;
|
||||
|
||||
function format(value: number, options?: { thousandsSeparator: string }): string;
|
||||
|
||||
/**
|
||||
*Parse string to an integer in bytes.
|
||||
* Just return the input number value.
|
||||
*
|
||||
* @param {number} value
|
||||
* @return {number}
|
||||
*/
|
||||
function parse(value: number): number;
|
||||
|
||||
/**
|
||||
* Parse the string value into an integer in bytes.
|
||||
*
|
||||
* If no unit is given, it is assumed the value is in bytes.
|
||||
*
|
||||
* @param {string} value
|
||||
* @returns {number}
|
||||
* @return {number}
|
||||
*/
|
||||
function bytes(value: string): number;
|
||||
|
||||
namespace bytes {
|
||||
|
||||
/**
|
||||
* Format the given value in bytes into a string.
|
||||
*
|
||||
* If the value is negative, take Math.abs(). If it is a float,
|
||||
* it is rounded.
|
||||
*
|
||||
* @param {number} value
|
||||
* @param {BytesFormatOptions} [options]
|
||||
*/
|
||||
|
||||
function format(value: number, options?: { thousandsSeparator: string }): string;
|
||||
|
||||
/**
|
||||
* Just return the input number value.
|
||||
*
|
||||
* @param {number} value
|
||||
* @return {number}
|
||||
*/
|
||||
function parse(value: number): number;
|
||||
|
||||
/**
|
||||
* Parse the string value into an integer in bytes.
|
||||
*
|
||||
* If no unit is given, it is assumed the value is in bytes.
|
||||
*
|
||||
* @param {string} value
|
||||
* @return {number}
|
||||
*/
|
||||
function parse(value: string): number;
|
||||
}
|
||||
|
||||
export = bytes;
|
||||
function parse(value: string): number;
|
||||
}
|
||||
|
||||
export = bytes;
|
||||
|
||||
Reference in New Issue
Block a user