[gunzip-maybe] Creation of Types (#43700)

* added gunzip-maybe

* Fix Linting
This commit is contained in:
Thomas 2020-04-08 09:08:12 +12:00 committed by GitHub
parent 80922190a8
commit d8a951cec2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,4 @@
import gunzip from "gunzip-maybe";
import * as fs from "fs";
fs.createReadStream("file.gz").pipe(gunzip()).pipe(fs.createWriteStream("file"));

12
types/gunzip-maybe/index.d.ts vendored Normal file
View File

@ -0,0 +1,12 @@
// Type definitions for gunzip-maybe 1.4
// Project: https://github.com/mafintosh/gunzip-maybe
// Definitions by: Thomas Hobson <https://github.com/hexf>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
import * as stream from "stream";
declare function gunzip(maxRecursion?: number): stream.Transform;
export = gunzip;

View File

@ -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"
]
}

View File

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