Skip to content

Commit

Permalink
♻️ refactor(watch): Add enqueue typings.
Browse files Browse the repository at this point in the history
  • Loading branch information
make-github-pseudonymous-again committed Jul 8, 2024
1 parent 8bf37fe commit bceeee0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions imports/api/query/watch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,12 @@ const _makeQueue = async () => {
});
await queue;

const enqueue = (task) => {
const enqueue = (task: () => Promise<void> | void) => {
// TODO Throttle.
if (queued !== 0) return;
++queued;
queue = queue
.then(() => {
.then(async () => {
--queued;
return task();
})
Expand Down

0 comments on commit bceeee0

Please sign in to comment.