MCPcopy Create free account
hub / github.com/freecodexyz/free-code / rejectWithTimeout

Function rejectWithTimeout

src/utils/sleep.ts:56–58  ·  view source on GitHub ↗
(reject: (e: Error) => void, message: string)

Source from the content-addressed store, hash-verified

54}
55
56function rejectWithTimeout(reject: (e: Error) => void, message: string): void {
57 reject(new Error(message))
58}
59
60/**
61 * Race a promise against a timeout. Rejects with `Error(message)` if the

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected