MCPcopy Create free account
hub / github.com/node-modules/utility / runWithTimeout

Function runWithTimeout

src/timeout.ts:31–36  ·  view source on GitHub ↗
(
  scope: () => Promise<T>,
  timeout: number,
)

Source from the content-addressed store, hash-verified

29}
30
31export async function runWithTimeout<T>(
32 scope: () => Promise<T>,
33 timeout: number,
34): Promise<T> {
35 return await promiseTimeout(scope(), timeout);
36}
37

Callers 1

timeout.test.tsFile · 0.85

Calls 1

promiseTimeoutFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…