queue-decorator
v1.0.3
Published
Queue Decorator (typescript) to Execute specific async method in Sequence
Downloads
3
Maintainers
Readme
Queue Decorator
Install
npm i queue-decorator
Usage
@Queue<ClassWhereQueueIsUsed, InputEntityType, ReturnEntityType>(
(a: InputEntityType, b: InputEntityType) => a.id === b.id,
)
async someAsyncMethod(entity: InputEntityType): Promise<ReturnEntityType> {
// stuff
}
Queue
decorator takes a function as predicate to check condition to Queue entities.