1 |
|
2 | import { Transform } from "stream";
|
3 | import { CancellationToken } from "./CancellationToken";
|
4 | export interface ProgressInfo {
|
5 | total: number;
|
6 | delta: number;
|
7 | transferred: number;
|
8 | percent: number;
|
9 | bytesPerSecond: number;
|
10 | }
|
11 | export declare class ProgressCallbackTransform extends Transform {
|
12 | private readonly total;
|
13 | private readonly cancellationToken;
|
14 | private readonly onProgress;
|
15 | private start;
|
16 | private transferred;
|
17 | private delta;
|
18 | private nextUpdate;
|
19 | constructor(total: number, cancellationToken: CancellationToken, onProgress: (info: ProgressInfo) => any);
|
20 | _transform(chunk: any, encoding: string, callback: any): void;
|
21 | _flush(callback: any): void;
|
22 | }
|