MCPcopy Create free account
hub / github.com/codeaashu/claude-code / onAbort

Function onAbort

src/utils/sleep.ts:41–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39 resolve,
40 )
41 function onAbort(): void {
42 clearTimeout(timer)
43 if (opts?.throwOnAbort || opts?.abortError) {
44 void reject(opts.abortError?.() ?? new Error('aborted'))
45 } else {
46 void resolve()
47 }
48 }
49 signal?.addEventListener('abort', onAbort, { once: true })
50 if (opts?.unref) {
51 timer.unref()

Callers

nothing calls this directly

Calls 1

resolveFunction · 0.70

Tested by

no test coverage detected