diff --git a/types/unzipper/index.d.ts b/types/unzipper/index.d.ts index 034fb5b099..43c50e1818 100644 --- a/types/unzipper/index.d.ts +++ b/types/unzipper/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for unzipper 0.8 +// Type definitions for unzipper 0.9 // Project: https://github.com/ZJONSSON/node-unzipper#readme // Definitions by: s73obrien // Nate @@ -57,6 +57,7 @@ export function unzip( ): Entry; export namespace Open { + function buffer(data: Buffer): Promise; function file(filename: string): Promise; function url( request: ClientRequest, diff --git a/types/unzipper/unzipper-tests.ts b/types/unzipper/unzipper-tests.ts index 7a8fbf9f4a..26cebebdef 100644 --- a/types/unzipper/unzipper-tests.ts +++ b/types/unzipper/unzipper-tests.ts @@ -41,3 +41,4 @@ createReadStream("http://example.org/path/to/archive.zip") const dir1: Promise = Open.file("Z:\\path\\to\\archive.zip"); const dir2: Promise = Open.url(get("url/to/archive.zip"), {}); const dir3: Promise = Open.s3("any", "any"); +const dir4: Promise = Open.buffer(Buffer.from('ZIPDATA'));