Documentation
    Preparing search index...

    Function promiseWithResolvers

    • Polyfill for Promise.withResolvers().

      This is specifically for Cloudflare Workers. Their implementation of Promise.withResolvers does not work correctly.

      Type Parameters

      • T

      Returns {
          promise: Promise<T>;
          reject: (reason?: any) => void;
          resolve: (value: T | PromiseLike<T>) => void;
      }