Skip to content
module@warp-drive/core/request

Function setPromiseResult() ​

ts
function setPromiseResult(promise: 
  | Awaitable<unknown, unknown>
  | Promise<unknown>, result: CacheResult): void;

Defined in: warp-drive-packages/core/src/request/-private/promise-cache.ts:61

Cache the settled result (or error) of a promise-like value so that its outcome can be synchronously read later via getPromiseResult, without needing to await it again.

Parameters ​

promise ​

| Awaitable<unknown, unknown> | Promise<unknown>

result ​

CacheResult

Returns ​

void

Released under the MIT License.