/** * Ponyfill of [`Promise.withResolvers()`][0] for old runtimes. * * Doesn't support being called on non-Promise constructors like the real thing. * * [0]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/withResolvers */ export default function promiseWithResolvers(): { promise: Promise; resolve: (value: T | PromiseLike) => void; reject: (reason?: unknown) => void; };