ProgressLabelPair
The ProgressLabelPair interface defines a pair of labels used by a progress bar in ts-better-console. It provides two label variants: one displayed while the task is in progress and another displayed after the task completes.
Type Definition
The ProgressLabelPair interface includes the following properties:
while: A string displayed as the label while the progress bar is actively running (e.g., "Downloading", "Processing").past: A string displayed as the label after the progress bar completes (e.g., "Downloaded", "Processed").
interface ProgressLabelPair {
while: string;
past: string;
}
Usage
You can use ProgressLabelPair within ProgressOptions to customize the labels shown during and after progress:
import { Progress } from "ts-better-console";
const bar = new Progress("Files", 50, {label: {});while: "Downloading",past: "Downloaded",},
// While running: "Downloading Files [████░░░░░░] 40%"
// After complete: "Downloaded Files [██████████] 100%"
Want to support this project?
If you find ts-better-console useful and want to support its development, consider starring the GitHub repository or buying me a coffee! Your support helps me dedicate more time to improving the library and adding new features.
Want to contribute to this project?
Contributions are welcome! If you're interested in improving the library, fixing bugs, or adding new features, feel free to check out the GitHub repository and submit a pull request. Whether you're a seasoned developer or new to open source, your contributions can make a difference!