MCPcopy Create free account
hub / github.com/denoland/std / stop

Method stop

cli/unstable_spinner.ts:261–266  ·  view source on GitHub ↗

* Stops the spinner. * * @example Usage * ```ts ignore * import { Spinner } from "@std/cli/unstable-spinner"; * * const spinner = new Spinner({ message: "Loading..." }); * spinner.start(); * * setTimeout(() => { * spinner.stop(); * console.log("Finished loading!");

()

Source from the content-addressed store, hash-verified

259 * ```
260 */
261 stop() {
262 if (this.#intervalId === null) return;
263 clearInterval(this.#intervalId);
264 this.#intervalId = null;
265 this.#output.writeSync(LINE_CLEAR); // Clear the current line
266 }
267}

Callers 4

flushMethod · 0.45
cancelMethod · 0.45

Calls 1

writeSyncMethod · 0.65

Tested by

no test coverage detected