UNPKG

@anthropic-ai/sdk

Version:
18 lines 552 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.promiseWithResolvers = promiseWithResolvers; /** * A deferred: a `Promise` together with its `resolve` / `reject` functions. * This is `Promise.withResolvers()`, which is not available in all supported * runtimes. */ function promiseWithResolvers() { let resolve; let reject; const promise = new Promise((res, rej) => { resolve = res; reject = rej; }); return { promise, resolve, reject }; } //# sourceMappingURL=promise.js.map