method PrinterService.showProgressBar
PrinterService.showProgressBar(
units: string,
message?: string,
total?: number,
current?: number,
): Promise<number>

Display a progress bar on stderr.

The progress will be displayed in green if colorEnabled is true.

NOTE: The progress bar and message will be displayed at INFO level.

NOTE: If the spinner is currently displayed it will be hidden.

Parameters

units: string

the units to display for progress indication e.g. 'MB' or 'Kb'.

optional
message: string

an optional message for the progress bar.

optional
total: number

the total value which equates to 100% complete, defaults to 100.

optional
current: number

the current value which is a portion of the total value, defaults to 0.

Return Type

Promise<number>

a handle to use when invoking updateProgressBar.

Usage

import type PrinterService from ".";