Skip to content

SpinnerHandle ​

Handle returned by Out.spinner for lifecycle control.

Terminal methods (succeed, fail, stop) are idempotent — calling any of them after the handle is already stopped is a no-op, not an error.

Signatures ​

ts
interface SpinnerHandle {}

Members ​

Methods ​

fail ​

ts
fail(text?: string): void;

stop ​

ts
stop(): void;

succeed ​

ts
succeed(text?: string): void;

update ​

ts
update(text: string): void;

wrap ​

ts
wrap<T>(promise: Promise<T>, options?: { fail?: string; succeed?: string; }): Promise<T>;

See Also ​

Released under the MIT License.