From 0a53cd74f51582904f200e342fece664cb932e1b Mon Sep 17 00:00:00 2001 From: Aleh Zasypkin Date: Fri, 16 Feb 2018 12:53:09 +0100 Subject: [PATCH] ora: `promise` method should belong to `oraFactory`, not `Ora` class. --- types/ora/index.d.ts | 5 +++-- types/ora/ora-tests.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/types/ora/index.d.ts b/types/ora/index.d.ts index 05c4c9b460..f5dd605073 100644 --- a/types/ora/index.d.ts +++ b/types/ora/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Basarat Ali Syed // Christian Rackerseder // BendingBender +// Aleh Zasypkin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -118,14 +119,14 @@ declare class Ora { text: string; color: Color; - - promise(action: PromiseLike, options?: Options | string): Ora; } interface oraFactory { (options?: Options | string): Ora; new (options?: Options | string): Ora; + + promise(action: PromiseLike, options?: Options | string): Ora; } declare const ora: oraFactory; diff --git a/types/ora/ora-tests.ts b/types/ora/ora-tests.ts index ca5db9d70d..56a0d498c3 100644 --- a/types/ora/ora-tests.ts +++ b/types/ora/ora-tests.ts @@ -41,7 +41,7 @@ spinner.stopAndPersist({text: 'all done'}); spinner.stopAndPersist({symbol: '@', text: 'all done'}); const resolves = Promise.resolve(1); -spinner.promise(resolves, { +Ora.promise(resolves, { stream: new PassThrough(), text: 'foo', color: 'blue',