[compressible] add typings

This commit is contained in:
Dimitri Benin
2017-08-15 19:04:45 +02:00
parent d4f42ab007
commit 7cab25035d
4 changed files with 36 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
import compressible = require('compressible');
// $ExpectType boolean | undefined
compressible('text/html');
compressible('image/png');
+8
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;
+22
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"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }