π File detail
utils/commandLifecycle.ts
π§© .tsπ 22 linesπΎ 440 bytesπ text
β Back to All Filesπ― Use case
This file lives under βutils/β, which covers cross-cutting helpers (shell, tempfiles, settings, messages, process input, β¦). On the API surface it exposes setCommandLifecycleListener and notifyCommandLifecycle β mainly functions, hooks, or classes.
Generated from folder role, exports, dependency roots, and inline comments β not hand-reviewed for every path.
π§ Inline summary
type CommandLifecycleState = 'started' | 'completed' type CommandLifecycleListener = ( uuid: string, state: CommandLifecycleState,
π€ Exports (heuristic)
setCommandLifecycleListenernotifyCommandLifecycle
π₯οΈ Source preview
type CommandLifecycleState = 'started' | 'completed'
type CommandLifecycleListener = (
uuid: string,
state: CommandLifecycleState,
) => void
let listener: CommandLifecycleListener | null = null
export function setCommandLifecycleListener(
cb: CommandLifecycleListener | null,
): void {
listener = cb
}
export function notifyCommandLifecycle(
uuid: string,
state: CommandLifecycleState,
): void {
listener?.(uuid, state)
}