Skip to content

Commit

Permalink
fix: add status method
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed Dec 17, 2021
1 parent f209f8f commit 9cf2069
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/ux.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,21 @@ export class Spinner {
}

/**
* Stop a spinner on the console.
* Stop the spinner on the console.
*/
public stop(msg?: string): void {
if (!this.jsonEnabled) cli.action.stop(msg);
}

/**
* Pause a spinner on the console.
* Set the status of the current spinner.
*/
public status(status: string): void {
if (!this.jsonEnabled) cli.action.status = status;
}

/**
* Pause the spinner on the console.
*/
public pause(fn: () => unknown, icon?: string): void {
if (!this.jsonEnabled) cli.action.pause(fn, icon);
Expand Down

0 comments on commit 9cf2069

Please sign in to comment.