diff --git a/types/gunzip-maybe/gunzip-maybe-tests.ts b/types/gunzip-maybe/gunzip-maybe-tests.ts new file mode 100644 index 0000000000..f13d1a4dbc --- /dev/null +++ b/types/gunzip-maybe/gunzip-maybe-tests.ts @@ -0,0 +1,4 @@ +import gunzip from "gunzip-maybe"; +import * as fs from "fs"; + +fs.createReadStream("file.gz").pipe(gunzip()).pipe(fs.createWriteStream("file")); diff --git a/types/gunzip-maybe/index.d.ts b/types/gunzip-maybe/index.d.ts new file mode 100644 index 0000000000..bef7d61d27 --- /dev/null +++ b/types/gunzip-maybe/index.d.ts @@ -0,0 +1,12 @@ +// Type definitions for gunzip-maybe 1.4 +// Project: https://github.com/mafintosh/gunzip-maybe +// Definitions by: Thomas Hobson +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import * as stream from "stream"; + +declare function gunzip(maxRecursion?: number): stream.Transform; + +export = gunzip; diff --git a/types/gunzip-maybe/tsconfig.json b/types/gunzip-maybe/tsconfig.json new file mode 100644 index 0000000000..3ad751e5c6 --- /dev/null +++ b/types/gunzip-maybe/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictFunctionTypes": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "gunzip-maybe-tests.ts" + ] +} \ No newline at end of file diff --git a/types/gunzip-maybe/tslint.json b/types/gunzip-maybe/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/gunzip-maybe/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }