Types & Enums
Types
TasksList
type TasksList<T = any> = { readonly running: Tasks<T>; readonly pending: Tasks<T>; readonly completed: Tasks<T>;};TasksCount
type TasksCount<T = any> = { total: number; completed: number; list: Task<T>[];};RunnerDuration
type RunnerDuration = { start: number; end: number; total: number;};TaskWithDone
type TaskWithDone<T = any> = ( done: Done<T>, id: TaskID) => TaskReturn<T> | Promise<TaskReturn<T>>;TasksWithDone
type TasksWithDone<T = any> = TaskWithDone<T>[];Done
type Done<T = any> = (result?: T) => void;Enums
TaskStatus
enum TaskStatus { PENDING = "pending", RUNNING = "running", CANCELLED = "cancelled", DONE = "done",}RunnerEvents
enum RunnerEvents { START = "onStart", PAUSE = "onPause", DESTROY = "onDestroy", ADD = "onAdd", REMOVE = "onRemove", RUN = "onRun", DONE = "onDone", END = "onEnd",}AdditionMethods
enum AdditionMethods { FIRST = "first", LAST = "last", AT_INDEX = "at-index", MULTIPLE_FIRST = "multiple-first", MULTIPLE_LAST = "multiple-range",}RemovalMethods
enum RemovalMethods { ALL = "all", BY_INDEX = "by-index", RANGE = "range", FIRST = "first", LAST = "last",}