Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(cli): make spinner unstable/experimental #5067

Merged
merged 1 commit into from
Jun 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions cli/spinner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ const DEFAULT_SPINNER = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧",
// deno-lint-ignore ban-types
export type Ansi = string & {};

/** Color options for {@linkcode SpinnerOptions.color}. */
/**
* **UNSTABLE**: New API, yet to be vetted.
*
* Color options for {@linkcode SpinnerOptions.color}.
*
* @experimental
*/
export type Color =
| "black"
| "red"
Expand All @@ -43,7 +49,13 @@ const COLORS: Record<Color, string> = {
gray: "\u001b[90m",
};

/** Options for {@linkcode Spinner}. */
/**
* **UNSTABLE**: New API, yet to be vetted.
*
* Options for {@linkcode Spinner}.
*
* @experimental
*/
export interface SpinnerOptions {
/**
* The sequence of characters to be iterated through for animation.
Expand All @@ -70,6 +82,8 @@ export interface SpinnerOptions {
}

/**
* **UNSTABLE**: New API, yet to be vetted.
*
* A spinner that can be used to indicate that something is loading.
*
* @example Usage
Expand All @@ -84,6 +98,8 @@ export interface SpinnerOptions {
* console.log("Finished loading!");
* }, 3_000);
* ```
*
* @experimental
*/
export class Spinner {
#spinner: string[];
Expand Down