Skip to content

Commit

Permalink
chore: add module doc for Promise.withResolvers polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
redabacha committed Apr 3, 2024
1 parent dfc6b0f commit 5a583b2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions promise-with-resolvers-polyfill.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* @module
*
* A polyfill for Promise.withResolvers. To use, import at the entrypoint of your application.
*/

if (!Promise["withResolvers"]) {
Promise["withResolvers"] = function withResolvers<T>() {
let promiseResolve: PromiseWithResolvers<T>["resolve"];
Expand Down

0 comments on commit 5a583b2

Please sign in to comment.