From 7da71a3f4593230a302efad5a13c8136f6a6e908 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Fri, 14 Dec 2018 10:14:53 -0800 Subject: [PATCH] progress uses export= not export default --- types/multi-progress/index.d.ts | 4 +- types/progress/index.d.ts | 90 +++++++++++++++++---------------- 2 files changed, 48 insertions(+), 46 deletions(-) diff --git a/types/multi-progress/index.d.ts b/types/multi-progress/index.d.ts index db15a15b1b..9b8a2bd965 100644 --- a/types/multi-progress/index.d.ts +++ b/types/multi-progress/index.d.ts @@ -5,7 +5,7 @@ /// -import ProgressBar, { ProgressBarOptions } from 'progress'; +import ProgressBar = require('progress'); import { Stream } from 'stream'; export default class MultiProgress { @@ -18,7 +18,7 @@ export default class MultiProgress { /** * Add a new bar */ - newBar: (format: string, options: ProgressBarOptions) => ProgressBar; + newBar: (format: string, options: ProgressBar.Options) => ProgressBar; /** * Close all bars diff --git a/types/progress/index.d.ts b/types/progress/index.d.ts index 6f6e2ea33d..2f94f64cc7 100644 --- a/types/progress/index.d.ts +++ b/types/progress/index.d.ts @@ -7,59 +7,61 @@ -/** - * These are keys in the options object you can pass to the progress bar along with total as seen in the example above. - */ -export interface ProgressBarOptions { +declare namespace ProgressBar { /** - * Total number of ticks to complete. + * These are keys in the options object you can pass to the progress bar along with total as seen in the example above. */ - total: number; + interface Options { + /** + * Total number of ticks to complete. + */ + total: number; - /** - * current completed index - */ - curr?: number; + /** + * current completed index + */ + curr?: number; - /** - * head character defaulting to complete character - */ - head?: string; + /** + * head character defaulting to complete character + */ + head?: string; - /** - * The displayed width of the progress bar defaulting to total. - */ - width?: number; + /** + * The displayed width of the progress bar defaulting to total. + */ + width?: number; - /** - * minimum time between updates in milliseconds defaulting to 16 - */ - renderThrottle?: number; + /** + * minimum time between updates in milliseconds defaulting to 16 + */ + renderThrottle?: number; - /** - * The output stream defaulting to stderr. - */ - stream?: NodeJS.WritableStream; + /** + * The output stream defaulting to stderr. + */ + stream?: NodeJS.WritableStream; - /** - * Completion character defaulting to "=". - */ - complete?: string; + /** + * Completion character defaulting to "=". + */ + complete?: string; - /** - * Incomplete character defaulting to "-". - */ - incomplete?: string; + /** + * Incomplete character defaulting to "-". + */ + incomplete?: string; - /** - * Option to clear the bar on completion defaulting to false. - */ - clear?: boolean; + /** + * Option to clear the bar on completion defaulting to false. + */ + clear?: boolean; - /** - * Optional function to call when the progress bar completes. - */ - callback?: Function; + /** + * Optional function to call when the progress bar completes. + */ + callback?: Function; + } } @@ -90,7 +92,7 @@ declare class ProgressBar { * - `:eta` eta in seconds */ constructor(format: string, total: number); - constructor(format: string, options: ProgressBarOptions); + constructor(format: string, options: ProgressBar.Options); /** @@ -138,4 +140,4 @@ declare class ProgressBar { } declare namespace ProgressBar { } -export default ProgressBar; +export = ProgressBar;