Skip to content

Commit 50c1ebb

Browse files
committed
add note about removing withResolvers utility whne we drop support for Node 20
1 parent a3340db commit 50c1ebb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/metrics/tests/unit/helpers.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ type Invocation = {
1212
* a more convenient way to create promises that can be resolved or rejected from
1313
* outside the Promise constructor.
1414
*
15+
* We need this polyfill because this function is not available in Node 20. When we drop
16+
* support for this version of Node, then we should remove this function and use the
17+
* inbuilt `Promise.withResolvers` static methods.
18+
*
1519
* @returns Object containing the promise and its resolve/reject functions
1620
*
1721
* @example

0 commit comments

Comments
 (0)