Skip to content

Commit

Permalink
Merge pull request #54 from GMOD/nodeUnzip_return_type
Browse files Browse the repository at this point in the history
Specify `nodeUnzip`'s return type
  • Loading branch information
garrettjstevens authored Dec 15, 2021
2 parents 2ee5724 + 9b35f7c commit 3924732
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/unzip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { pakoUnzip, unzipChunk, unzipChunkSlice } from './unzip-pako'
const gunzip = promisify(zlib.gunzip)

// in node, just use the native unzipping with Z_SYNC_FLUSH
function nodeUnzip(input: Buffer) {
function nodeUnzip(input: Buffer): Promise<Buffer> {
//@ts-ignore
return gunzip(input, {
finishFlush: (zlib.constants || zlib).Z_SYNC_FLUSH,
Expand Down

0 comments on commit 3924732

Please sign in to comment.