[cli-progress] increment can be called without parameters. (#41945)

> Increases the current progress value by a specified amount (default +1). Update payload optionally

Source: https://www.npmjs.com/package/cli-progress#increment
This commit is contained in:
Alexander Pepper
2020-01-29 22:44:52 +01:00
committed by GitHub
parent 31cfe25179
commit c4b6c8f6c3
2 changed files with 3 additions and 1 deletions

View File

@@ -94,6 +94,8 @@ function test5() {
function test6() {
// SingleBar
const bar2 = new progress.SingleBar({}, progress.Presets.shades_classic);
bar2.increment();
bar2.increment(10);
// MultiBar
const multiBar = new progress.MultiBar({}, progress.Presets.shades_classic);

View File

@@ -122,7 +122,7 @@ export class SingleBar {
getTotal(): any;
/** Increases the current progress value by a specified amount (default +1). Update payload optionally */
increment(step: number, payload?: object): void;
increment(step?: number, payload?: object): void;
render(): void;