mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
[node] add zlib.bytesWritten
This commit is contained in:
parent
19817ba6bd
commit
308ec150ad
2
types/node/index.d.ts
vendored
2
types/node/index.d.ts
vendored
@ -1781,7 +1781,9 @@ declare module "zlib" {
|
||||
}
|
||||
|
||||
interface Zlib {
|
||||
/** @deprecated Use bytesWritten instead. */
|
||||
readonly bytesRead: number;
|
||||
readonly bytesWritten: number;
|
||||
close(callback?: () => void): void;
|
||||
flush(kind?: number | (() => void), callback?: () => void): void;
|
||||
}
|
||||
|
||||
@ -4172,6 +4172,11 @@ import * as constants from 'constants';
|
||||
const deflate = zlib.deflateSync('test');
|
||||
const inflate = zlib.inflateSync(deflate.toString());
|
||||
}
|
||||
|
||||
{
|
||||
const gzip = zlib.createGzip();
|
||||
const written: number = gzip.bytesWritten;
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
Loading…
Reference in New Issue
Block a user