@@ -121,7 +121,7 @@ class Deflate {
121121 * Chunks of output data, if {@link Deflate.onData} not overridden.
122122 * @internal
123123 */
124- chunks : Uint8Array [ ] ;
124+ chunks : Uint8Array < ArrayBuffer > [ ] ;
125125
126126 private strm : ZStream ;
127127
@@ -130,7 +130,7 @@ class Deflate {
130130 * and {@link Deflate.onEnd} handlers. Filled after you push last chunk
131131 * (call {@link Deflate.push} with {@link Z_FINISH} / `true` param).
132132 */
133- result : Uint8Array ;
133+ result : Uint8Array < ArrayBuffer > ;
134134
135135 /**
136136 * Creates a new deflator instance with the specified params. Throws an
@@ -320,7 +320,7 @@ class Deflate {
320320 * By default, stores data blocks in the {@link Deflate.chunks} property and glues
321321 * them in {@link Deflate.onEnd}. Override this handler if you need another behaviour.
322322 */
323- onData ( chunk : Uint8Array ) : void {
323+ onData ( chunk : Uint8Array < ArrayBuffer > ) : void {
324324 this . chunks . push ( chunk ) ;
325325 }
326326
@@ -355,7 +355,7 @@ class Deflate {
355355 * console.log(deflate(data))
356356 * ```
357357 */
358- function deflate ( input : DeflateInput , options : DeflateOptions = { } ) : Uint8Array {
358+ function deflate ( input : DeflateInput , options : DeflateOptions = { } ) : Uint8Array < ArrayBuffer > {
359359 const deflator = new Deflate ( options ) ;
360360
361361 deflator . push ( input , true ) ;
@@ -371,7 +371,7 @@ function deflate(input: DeflateInput, options: DeflateOptions = {}): Uint8Array
371371 * The same as {@link deflate}, but creates raw data without a wrapper
372372 * (header and adler32 crc).
373373 */
374- function deflateRaw ( input : DeflateInput , options : DeflateOptions = { } ) : Uint8Array {
374+ function deflateRaw ( input : DeflateInput , options : DeflateOptions = { } ) : Uint8Array < ArrayBuffer > {
375375 return deflate ( input , Object . assign ( { } , options , { raw : true } ) ) ;
376376}
377377
@@ -380,7 +380,7 @@ function deflateRaw(input: DeflateInput, options: DeflateOptions = {}): Uint8Arr
380380 * The same as {@link deflate}, but creates a gzip wrapper instead of
381381 * a deflate one.
382382 */
383- function gzip ( input : DeflateInput , options : DeflateOptions = { } ) : Uint8Array {
383+ function gzip ( input : DeflateInput , options : DeflateOptions = { } ) : Uint8Array < ArrayBuffer > {
384384 return deflate ( input , Object . assign ( { } , options , { gzip : true } ) ) ;
385385}
386386
0 commit comments