MCPcopy Create free account
hub / github.com/anus-dev/ANUS / registerCleanup

Function registerCleanup

packages/cli/src/utils/cleanup.ts:14–16  ·  view source on GitHub ↗
(fn: (() => void) | (() => Promise<void>))

Source from the content-addressed store, hash-verified

12const cleanupFunctions: Array<(() => void) | (() => Promise<void>)> = [];
13
14export function registerCleanup(fn: (() => void) | (() => Promise<void>)) {
15 cleanupFunctions.push(fn);
16}
17
18export async function runExitCleanup() {
19 for (const fn of cleanupFunctions) {

Callers 1

cleanup.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected