Adds a promise to the given Set while it is pending, and automatically removes it once the promise settles (resolves or rejects). Returns a promise that resolves or rejects with the same value as the input promise.
The resolved value type of the promise.
Set to track the pending promise.
The promise to track.
A promise that resolves or rejects with the same value as the input promise.
Adds a promise to the given Set while it is pending, and automatically removes it once the promise settles (resolves or rejects). Returns a promise that resolves or rejects with the same value as the input promise.