Skip to content

Commit

Permalink
Minor TS definition tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Mar 5, 2019
1 parent f33e6dc commit d37b75e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions index.d.ts
@@ -1,5 +1,5 @@
/// <reference types="node"/>
import {Writable} from 'stream';
import {Writable as WritableStream} from 'stream';
import {SpinnerName} from 'cli-spinners';

export type Spinner = Readonly<{
Expand Down Expand Up @@ -76,7 +76,7 @@ export type Options = Readonly<{
*
* @default process.stderr
*/
stream?: Writable;
stream?: WritableStream;

/**
* Force enable/disable the spinner. If not specified, the spinner will be enabled if the `stream` is being run inside a TTY context (not spawned or piped) and/or not in a CI environment.
Expand Down
6 changes: 3 additions & 3 deletions index.test-d.ts
@@ -1,5 +1,5 @@
import {expectType} from 'tsd-check';
import {PassThrough} from 'stream';
import {PassThrough as PassThroughStream} from 'stream';
import ora, {promise} from '.';

const spinner = ora('Loading unicorns');
Expand All @@ -11,7 +11,7 @@ ora({color: 'cyan'});
ora({hideCursor: true});
ora({indent: 1});
ora({interval: 80});
ora({stream: new PassThrough()});
ora({stream: new PassThroughStream()});
ora({isEnabled: true});

spinner.color = 'yellow';
Expand Down Expand Up @@ -41,7 +41,7 @@ spinner.frame();
const resolves = Promise.resolve(1);
promise(resolves, 'foo');
promise(resolves, {
stream: new PassThrough(),
stream: new PassThroughStream(),
text: 'foo',
color: 'blue',
isEnabled: true
Expand Down

0 comments on commit d37b75e

Please sign in to comment.