MCPcopy Index your code
hub / github.com/codeaashu/claude-code / withResolvers

Function withResolvers

src/utils/withResolvers.ts:5–13  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3 * package.json declares "engines": { "node": ">=18.0.0" } so we can't use the native one.
4 */
5export function withResolvers<T>(): PromiseWithResolvers<T> {
6 let resolve!: (value: T | PromiseLike<T>) => void
7 let reject!: (reason?: unknown) => void
8 const promise = new Promise<T>((res, rej) => {
9 resolve = res
10 reject = rej
11 })
12 return { promise, resolve, reject }
13}
14

Callers 2

drainRunLoopFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected