fix multi-progress typing to expose constructor as namespace

This commit is contained in:
Bryan Kendall 2018-12-13 14:47:24 -08:00
parent db1fac022e
commit 4f40fdc2ec
No known key found for this signature in database
GPG Key ID: 824E061015787F62
2 changed files with 8 additions and 2 deletions

View File

@ -8,7 +8,11 @@
import * as ProgressBar from 'progress';
import { Stream } from 'stream';
export default class MultiProgress {
export as namespace MultiProgress;
export = MultiProgress;
declare 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
@ -40,3 +44,5 @@ export default class MultiProgress {
*/
update: (index: number, value: number, options?: any) => void;
}
declare namespace MultiProgress {}

View File

@ -3,7 +3,7 @@
*/
// require the library
import MultiProgress from 'multi-progress';
import * as MultiProgress from 'multi-progress';
// spawn an instance with the optional stream to write to
// use of `new` is optional