Merge pull request #17723 from plantain-00/pretty-bytes

add types of pretty-bytes
This commit is contained in:
Ron Buckton
2017-07-06 21:49:01 -07:00
committed by GitHub
4 changed files with 40 additions and 0 deletions

8
types/pretty-bytes/index.d.ts vendored Normal file
View File

@@ -0,0 +1,8 @@
// Type definitions for pretty-bytes 4.0
// Project: https://github.com/sindresorhus/pretty-bytes
// Definitions by: York Yao <https://github.com/plantain-00>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function prettyBytes(bytes: number): string;
export = prettyBytes;
declare namespace prettyBytes { }

View File

@@ -0,0 +1,7 @@
import prettyBytes = require('pretty-bytes');
prettyBytes(1337);
// => '1.34 kB'
prettyBytes(100);
// => '100 B'

View File

@@ -0,0 +1,22 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"pretty-bytes-tests.ts"
]
}

View File

@@ -0,0 +1,3 @@
{
"extends": "dtslint/dt.json"
}