Skip to content

Commit

Permalink
Less ts-ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Dec 15, 2021
1 parent 015048f commit 26dddb8
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/unzip-pako.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable consistent-return */

//@ts-ignore
import { Z_SYNC_FLUSH, Inflate } from 'pako'

Expand Down Expand Up @@ -67,13 +65,11 @@ async function unzipChunk(inputData: Buffer) {
const inflator = new Inflate()
// @ts-ignore
;({ strm } = inflator)
// @ts-ignore
inflator.push(remainingInput, Z_SYNC_FLUSH)
if (inflator.err) {
throw new Error(inflator.msg)
}

// @ts-ignore
const buffer = Buffer.from(inflator.result)
blocks.push(buffer)

Expand Down Expand Up @@ -112,13 +108,11 @@ async function unzipChunkSlice(inputData: Buffer, chunk: Chunk) {
const inflator = new Inflate()
// @ts-ignore
;({ strm } = inflator)
// @ts-ignore
inflator.push(remainingInput, Z_SYNC_FLUSH)
if (inflator.err) {
throw new Error(inflator.msg)
}

// @ts-ignore
const buffer = Buffer.from(inflator.result)
decompressedBlocks.push(buffer)
let len = buffer.length
Expand Down

0 comments on commit 26dddb8

Please sign in to comment.