Socket
Socket
Sign inDemoInstall

@types/cli-progress

Package Overview
Dependencies
2
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @types/cli-progress

TypeScript definitions for cli-progress


Version published
Weekly downloads
1.2M
decreased by-2.2%
Maintainers
1
Install size
3.83 MB
Created
Weekly downloads
 

Package description

What is @types/cli-progress?

The @types/cli-progress package provides TypeScript type definitions for the cli-progress package, which is a library for creating customizable progress bars in command line interfaces. These type definitions enable TypeScript developers to use cli-progress in their projects with the benefits of TypeScript's static type checking.

What are @types/cli-progress's main functionalities?

Single Progress Bar

This feature allows you to create and manage a single progress bar. The code sample demonstrates how to initialize, update, and stop a progress bar.

import { SingleBar } from 'cli-progress';

const bar = new SingleBar({});
bar.start(100, 0);

// Update the current value in your application.
bar.update(50);

// Stop the progress bar when done.
bar.stop();

Multi Progress Bar

This feature enables the management of multiple progress bars simultaneously. The code sample shows how to create multiple progress bars and update them independently.

import { MultiBar } from 'cli-progress';

const multi = new MultiBar({});
const bar1 = multi.create(100, 0);
const bar2 = multi.create(200, 0);

// Update the bars independently
bar1.update(50);
bar2.update(150);

// Stop all bars
multi.stop();

Custom Bar Styles

This feature allows for the customization of the progress bar's appearance, including the complete and incomplete characters and the format of the bar. The code sample demonstrates how to customize these aspects.

import { SingleBar } from 'cli-progress';

const bar = new SingleBar({
  barCompleteChar: '#',
  barIncompleteChar: '.',
  format: 'custom |' + '{bar}' + '| {percentage}%'
});
bar.start(100, 0);
bar.update(55);
bar.stop();

Other packages similar to @types/cli-progress

Readme

Source

Installation

npm install --save @types/cli-progress

Summary

This package contains type definitions for cli-progress (https://github.com/AndiDittrich/Node.CLI-Progress).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cli-progress.

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:05 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Mohamed Hegazy, Álvaro Martínez, Piotr Błażejewicz, and Marko Schilde.

FAQs

Last updated on 07 Nov 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc