interface AnyPromiseWithResolvers { promise: Instance; resolve: (value: T | PromiseLike) => void; reject: (reason?: any) => void; } type AnyPromiseConstructor = new ( executor: ( resolve: PromiseWithResolvers["resolve"], reject: PromiseWithResolvers["reject"], ) => void, ) => Promise; interface PromiseConstructor { /** * Creates a new Promise and returns it in an object, along with its resolve and reject functions. * @returns An object with the properties `promise`, `resolve`, and `reject`. * * ```ts * const { promise, resolve, reject } = Promise.withResolvers(); * ``` */ withResolvers>( this: K, ): AnyPromiseWithResolvers>; }