-
Notifications
You must be signed in to change notification settings - Fork 0
/
ProgressBar.ts
36 lines (35 loc) · 1.07 KB
/
ProgressBar.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/**
* describes a progress bar's progress
*/
export type ProgressBar = {
/**
* the overall estimation for the total time the task will take to complete
* from start to finish in seconds
*/
set overallEtaSeconds(eta: number);
/**
* the estimated time remaining for the task to complete in seconds;
* may be negative if the task is taking longer than expected
*/
set remainingEtaSeconds(eta: number);
/**
* the name of the step the task is currently on
*/
set stepName(name: string);
/**
* the overall estimation for the time the step the progress bar is currently
* on will take to complete in seconds
*/
set stepOverallEtaSeconds(eta: number);
/**
* the estimated time remaining for the step the progress bar is currently on
* to complete in seconds; may be negative if the step is taking longer than
* expected
*/
set stepRemainingEtaSeconds(eta: number);
/**
* called when an unrecoverable error occurs; such as our authentication being rejected
* @param err the error that occurred
*/
onError(err: Error): void;
};