@types/cli-progress
Advanced tools
Comparing version 3.9.2 to 3.11.0
@@ -1,2 +0,2 @@ | ||
// Type definitions for cli-progress 3.9 | ||
// Type definitions for cli-progress 3.11 | ||
// Project: https://github.com/AndiDittrich/Node.CLI-Progress | ||
@@ -6,2 +6,3 @@ // Definitions by: Mohamed Hegazy <https://github.com/mhegazy> | ||
// Piotr Błażejewicz <https://github.com/peterblazejewicz> | ||
// Marko Schilde <https://github.com/mschilde> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
@@ -86,2 +87,5 @@ /// <reference types="node" /> | ||
/** glue sequence (control chars) between bar elements (default: '') */ | ||
barGlue?: string | undefined; | ||
/** number of updates with which to calculate the eta; higher numbers give a more stable eta (default: 10) */ | ||
@@ -97,2 +101,5 @@ etaBuffer?: number | undefined; | ||
/** progress calculation relative to start value ? default start at 0 (default: false) */ | ||
progressCalculationRelative?: boolean | undefined; | ||
/** disable line wrapping (default: false) - pass null to keep terminal settings; pass true to trim the output to terminal width */ | ||
@@ -121,2 +128,5 @@ linewrap?: boolean | null | undefined; | ||
autopaddingChar?: string | undefined; | ||
/** stop bar on SIGINT/SIGTERM to restore cursor settings (default: true) */ | ||
gracefulExit?: boolean | undefined; | ||
} | ||
@@ -151,14 +161,22 @@ | ||
export class SingleBar extends EventEmitter { | ||
export class GenericBar extends EventEmitter { | ||
/** Initialize a new Progress bar. An instance can be used multiple times! it's not required to re-create it! */ | ||
constructor(opt: Options, preset?: Preset); | ||
calculateETA(): void; | ||
/** Force eta calculation update (long running processes) without altering the progress values. */ | ||
updateETA(): void; | ||
/** Internal render function */ | ||
render(forceRendering?: boolean): void; | ||
formatTime(t: any, roundToMultipleOf: any): any; | ||
/** Starts the progress bar and set the total and initial value */ | ||
start(total: number, startValue: number, payload?: object): void; | ||
getTotal(): any; | ||
/** Stops the progress bar and go to next line */ | ||
stop(): void; | ||
/** Sets the current progress value and optionally the payload with values of custom tokens as a second parameter */ | ||
update(current: number, payload?: object): void; | ||
update(payload: object): void; | ||
/** Calculate the actual progress value */ | ||
getProgress(): number; | ||
/** Increases the current progress value by a specified amount (default +1). Update payload optionally */ | ||
@@ -168,3 +186,4 @@ increment(step?: number, payload?: object): void; | ||
render(): void; | ||
/** Get the total (limit) value */ | ||
getTotal(): number; | ||
@@ -174,9 +193,12 @@ /** Sets the total progress value while progressbar is active. Especially useful handling dynamic tasks. */ | ||
/** Starts the progress bar and set the total and initial value */ | ||
start(total: number, startValue: number, payload?: object): void; | ||
/** Force eta calculation update (long running processes) without altering the progress values. */ | ||
updateETA(): void; | ||
} | ||
/** Stops the progress bar and go to next line */ | ||
stop(): void; | ||
export class SingleBar extends GenericBar { | ||
/** Initialize a new Progress bar. An instance can be used multiple times! it's not required to re-create it! */ | ||
constructor(opt: Options, preset?: Preset); | ||
stopTimer(): void; | ||
/** Internal render function */ | ||
render(): void; | ||
@@ -186,2 +208,8 @@ /** Sets the current progress value and optionally the payload with values of custom tokens as a second parameter */ | ||
update(payload: object): void; | ||
/** Starts the progress bar and set the total and initial value */ | ||
start(total: number, startValue: number, payload?: object): void; | ||
/** Stops the progress bar and go to next line */ | ||
stop(): void; | ||
} | ||
@@ -192,7 +220,15 @@ | ||
create(total: number, startValue: number, payload?: any): SingleBar; | ||
/** add a new bar to the stack */ | ||
create(total: number, startValue: number, payload?: any, barOptions?: Options): SingleBar; | ||
/** remove a bar from the stack */ | ||
remove(bar: SingleBar): boolean; | ||
/** internal update routine */ | ||
update(): void; | ||
stop(): void; | ||
/** log output above the progress bars; string must end with newline character! */ | ||
log(data: string): void; | ||
} | ||
@@ -199,0 +235,0 @@ |
{ | ||
"name": "@types/cli-progress", | ||
"version": "3.9.2", | ||
"version": "3.11.0", | ||
"description": "TypeScript definitions for cli-progress", | ||
@@ -22,2 +22,7 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cli-progress", | ||
"githubUsername": "peterblazejewicz" | ||
}, | ||
{ | ||
"name": "Marko Schilde", | ||
"url": "https://github.com/mschilde", | ||
"githubUsername": "mschilde" | ||
} | ||
@@ -36,4 +41,4 @@ ], | ||
}, | ||
"typesPublisherContentHash": "5e0d33e4f59968d6df72a241eb82d0a38e13ce287f48d50420023e764208ae3b", | ||
"typeScriptVersion": "3.6" | ||
"typesPublisherContentHash": "e288d01ff22a5d46bcc920c9cfe386f8235134916f43027f327b4b62f9c9a847", | ||
"typeScriptVersion": "3.9" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Tue, 06 Jul 2021 18:05:53 GMT | ||
* Last updated: Tue, 10 May 2022 21:01:36 GMT | ||
* Dependencies: [@types/node](https://npmjs.com/package/@types/node) | ||
@@ -17,2 +17,2 @@ * Global values: none | ||
# Credits | ||
These definitions were written by [ Mohamed Hegazy](https://github.com/mhegazy), [Álvaro Martínez](https://github.com/alvaromartmart), and [Piotr Błażejewicz](https://github.com/peterblazejewicz). | ||
These definitions were written by [ Mohamed Hegazy](https://github.com/mhegazy), [Álvaro Martínez](https://github.com/alvaromartmart), [Piotr Błażejewicz](https://github.com/peterblazejewicz), and [Marko Schilde](https://github.com/mschilde). |
13372
207