DefinitelyTyped/types/multi-progress/multi-progress-tests.ts
2018-12-11 16:51:05 -05:00

19 lines
425 B
TypeScript

/**
* Example from https://github.com/pitaj/multi-progress
*/
// require the library
import MultiProgress from 'multi-progress';
// spawn an instance with the optional stream to write to
// use of `new` is optional
const multi = new MultiProgress(process.stderr);
// create a progress bar
const bar = multi.newBar(' downloading [:bar] :percent :etas', {
complete: '=',
incomplete: ' ',
width: 30,
total: 20
});