Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
samthor committed Dec 23, 2024
1 parent 9cfcc6b commit 5099d37
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/promise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const timeout = (duration: number) => wrapTrigger(setTimeout, duration);
* Wraps {@link Promise.withResolvers} with a polyfill.
*/
export const promiseWithResolvers = /* @__PURE__ */ (() =>
// nb. needs fn call as esbuild doesn't understand @__PURE__ otherwise
Promise.withResolvers
? (Promise.withResolvers.bind(Promise) as <T>() => PromiseWithResolvers<T>)
: function localResolvable<T = void>(): PromiseWithResolvers<T> {
Expand Down

0 comments on commit 5099d37

Please sign in to comment.