import type { Arguments } from "./function.js"; /** Callback function that starts something with multiple values and returns an optional stop callback. */ export type StartCallback = (...values: T) => StopCallback | void; /** Callback function that stops something. */ export type StopCallback = () => void; /** * Wrapper class to handle state on start/stop callback process. * - If process has already started, `starter.start()` won't be called twice (including if `start()` didn't return a `stop()` callback). */ export declare class Starter implements Disposable { private readonly _start; private _stop; constructor(start: StartCallback); start(...values: T): void; stop(): void; [Symbol.dispose](): void; } /** Something that can be made into a `Starter` */ export type PossibleStarter = StartCallback | Starter; /** Get a `Starter` from a `PossibleStarter` */ export declare function getStarter(start: StartCallback | Starter): Starter;