/** * @file Status-presentation methods for the Socket `Spinner` class, split out * of `create-spinner-class.ts` to keep that module under the file-size cap. * Each method is a thin delegation to one of the two internal helpers the * class exposes via well-known symbols (`applyStatusSymbol`, * `showStatusSymbol`); `installStatusMethods()` defines them on the spinner * prototype after the class is built so they share the same private state. */ import type { SpinnerLogger } from './create-spinner-class.js'; import type { SpinnerInstance, SymbolType } from './types.js'; /** * Well-known symbol the spinner class uses to expose its `#apply` helper so the * status methods in this module can drive a yocto-spinner method + logger * update without reaching into a private field across the file boundary. */ export declare const applyStatusSymbol: unique symbol; /** * Well-known symbol the spinner class uses to expose its * `#showStatusAndKeepSpinning` helper so the status methods here can emit a * symbol-prefixed status line without stopping the spinner. */ export declare const showStatusSymbol: unique symbol; /** * Runtime shape of the spinner instance the status methods operate on. Only the * two symbol-keyed helpers are needed; everything else is reached through the * module-scope `logger`. */ export type StatusHost = SpinnerInstance & { [applyStatusSymbol]: (methodName: string, args: unknown[]) => SpinnerInstance; [showStatusSymbol]: (symbolType: SymbolType, args: unknown[]) => SpinnerInstance; }; /** * Install the status-presentation methods onto the spinner prototype. The * methods close over `logger` for the stdout/stderr writes and reach the * spinner's private helpers through the two well-known symbols. * * @param proto - The spinner class prototype to augment. * @param logger - Default logger used for status output. */ export declare function installStatusMethods(proto: object, logger: SpinnerLogger): void;