Merge pull request #18986 from BendingBender/compressible

[compressible] add typings
This commit is contained in:
Daniel Rosenwasser
2017-08-15 10:59:34 -07:00
committed by GitHub
4 changed files with 36 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
import compressible = require('compressible');
// $ExpectType boolean | undefined
compressible('text/html');
compressible('image/png');

8
types/compressible/index.d.ts vendored Normal file
View File

@@ -0,0 +1,8 @@
// Type definitions for compressible 2.0
// Project: https://github.com/jshttp/compressible#readme
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = compressible;
declare function compressible(type: string): boolean | undefined;

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",
"compressible-tests.ts"
]
}

View File

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