From 4f40fdc2ec032e766d72bf3fa5fbdc8fa53eec17 Mon Sep 17 00:00:00 2001 From: Bryan Kendall Date: Thu, 13 Dec 2018 14:47:24 -0800 Subject: [PATCH] fix multi-progress typing to expose constructor as namespace --- types/multi-progress/index.d.ts | 8 +++++++- types/multi-progress/multi-progress-tests.ts | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/types/multi-progress/index.d.ts b/types/multi-progress/index.d.ts index a98057ecc8..31dd11b710 100644 --- a/types/multi-progress/index.d.ts +++ b/types/multi-progress/index.d.ts @@ -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 {} diff --git a/types/multi-progress/multi-progress-tests.ts b/types/multi-progress/multi-progress-tests.ts index 9dde27c16b..b14806b7c5 100644 --- a/types/multi-progress/multi-progress-tests.ts +++ b/types/multi-progress/multi-progress-tests.ts @@ -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