mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-01-30 21:47:35 +00:00
fix multi-progress typing to expose constructor as namespace
This commit is contained in:
parent
db1fac022e
commit
4f40fdc2ec
8
types/multi-progress/index.d.ts
vendored
8
types/multi-progress/index.d.ts
vendored
@ -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 {}
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user