https://github.com/baguilar6174/react-ts-queue-app
Implementation of the queue data structure, using Typescript.
https://github.com/baguilar6174/react-ts-queue-app
data-structures queue typescript
Last synced: 5 months ago
JSON representation
Implementation of the queue data structure, using Typescript.
- Host: GitHub
- URL: https://github.com/baguilar6174/react-ts-queue-app
- Owner: baguilar6174
- Created: 2023-08-09T19:15:39.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-09T20:31:57.000Z (over 2 years ago)
- Last Synced: 2024-12-28T07:42:06.182Z (over 1 year ago)
- Topics: data-structures, queue, typescript
- Language: TypeScript
- Homepage: https://stackblitz.com/edit/stackblitz-starters-stguyc
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Data structure Queue
Implementation of the queue data structure, using Typescript.
## Usage
```typescript
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
});
```