MCPcopy
hub / github.com/vitejs/vite / promiseWithResolvers

Function promiseWithResolvers

playground/hmr-full-bundle-mode/vite.config.ts:55–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

53 reject: (reason?: any) => void
54}
55function promiseWithResolvers<T>(): PromiseWithResolvers<T> {
56 let resolve: any
57 let reject: any
58 const promise = new Promise<T>((_resolve, _reject) => {
59 resolve = _resolve
60 reject = _reject
61 })
62 return { promise, resolve, reject }
63}

Callers 2

configureServerFunction · 0.70
untilConsoleLogFunction · 0.50

Calls

no outgoing calls

Tested by 1

untilConsoleLogFunction · 0.40