// Type definitions for multi-progress 2.0
// Project: https://github.com/pitaj/multi-progress
// Definitions by: David Brett <https://github.com/DHBrett>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <reference types="node"/>

import ProgressBar, { ProgressBarOptions } from '../progress';
import { Stream } from 'stream';

export default class MultiProgress {
    /**
     * Create a new @see MultiProgress with the given stream, or stderr by default
     * @param stream A stream to write the progress bars to
     */
    constructor(stream?: Stream)

    /**
     * Add a new bar
     */
    newBar: (format: string, options: ProgressBarOptions) => ProgressBar;

    /**
     * Close all bars
     */
    terminate: () => void;

    /**
     * Render the given progress bar
     */
    move: (index: number) => void;

    /**
     * Move the bar indicated by index forward the number of steps indicated by value
     */
    tick: (index: number, value: number, options?: any) => void;

    /**
     * Update the bar indicated by index to the value given
     */
    update: (index: number, value: number, options?: any) => void;
}

// Type definitions for multi-progress 2.0
// Project: https://github.com/pitaj/multi-progress
// Definitions by: David Brett <https://github.com/DHBrett>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <reference types="node"/>

import ProgressBar, { ProgressBarOptions } from 'progress';
import { Stream } from 'stream';

export default class MultiProgress {
    /**
     * Create a new @see MultiProgress with the given stream, or stderr by default
     * @param stream A stream to write the progress bars to
     */
    constructor(stream?: Stream)

    /**
     * Add a new bar
     */
    newBar: (format: string, options: ProgressBarOptions) => ProgressBar;

    /**
     * Close all bars
     */
    terminate: () => void;

    /**
     * Render the given progress bar
     */
    move: (index: number) => void;

    /**
     * Move the bar indicated by index forward the number of steps indicated by value
     */
    tick: (index: number, value: number, options?: any) => void;

    /**
     * Update the bar indicated by index to the value given
     */
    update: (index: number, value: number, options?: any) => void;
}

Fix multi-progress reference to progress
Fix multi-progress reference to progress
