Skip to content

Commit

Permalink
chore: add typedoc comment for waitForShift
Browse files Browse the repository at this point in the history
  • Loading branch information
libkakashi committed Jul 20, 2024
1 parent 30afdca commit d3fe4c9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ class Queue<T> {
this.piped = true;
}

/*
* Returns a promise that resolves when any item has been consumed from the queue.
*/
waitForShift = () =>
new Promise<void>(resolve => this._shiftResolvers.push(resolve));

Expand Down

0 comments on commit d3fe4c9

Please sign in to comment.