Skip to content

baguilar6174/react-ts-queue-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Data structure Queue

Implementation of the queue data structure, using Typescript.

Usage

async function worker(amount: number, done: (result: number) => void) {
  const result = await updateAmount(amount); // For exmaple API call
  done(result);
}

const updateAmountQueued = Queue(worker);

updateAmountQueued(amount * multiplier, function callback(result) {
  // Your result in result variable
});

Releases

No releases published

Packages

No packages published

Languages