mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
Merge pull request #28256 from dobesv/unzipper-open-buffer
unzipper: Add unzipper.Open.buffer
This commit is contained in:
Vendored
+2
-1
@@ -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 <https://github.com/s73obrien>
|
||||
// Nate <https://github.com/natemara>
|
||||
@@ -57,6 +57,7 @@ export function unzip(
|
||||
): Entry;
|
||||
|
||||
export namespace Open {
|
||||
function buffer(data: Buffer): Promise<CentralDirectory>;
|
||||
function file(filename: string): Promise<CentralDirectory>;
|
||||
function url(
|
||||
request: ClientRequest,
|
||||
|
||||
@@ -41,3 +41,4 @@ createReadStream("http://example.org/path/to/archive.zip")
|
||||
const dir1: Promise<CentralDirectory> = Open.file("Z:\\path\\to\\archive.zip");
|
||||
const dir2: Promise<CentralDirectory> = Open.url(get("url/to/archive.zip"), {});
|
||||
const dir3: Promise<CentralDirectory> = Open.s3("any", "any");
|
||||
const dir4: Promise<CentralDirectory> = Open.buffer(Buffer.from('ZIPDATA'));
|
||||
|
||||
Reference in New Issue
Block a user