interface Vertex$1 { name: string; value: T; inEdges: Set>; outEdges: Set>; excludeFromSort: boolean; get outEdgeCount(): number; get inEdgeCount(): number; } interface DirectedGraph$1 { addVertex(value: T, options: { name?: string; excludeFromSort?: boolean; }): Vertex$1; topSort(): T[]; exists(value: T): boolean; hasEdge(from: T, to: T): boolean; addEdge(from: T, to: T): void; excludeFromSort(value: T, exclude: boolean): void; name(value: T, name: string): void; removeVertex(value: T): void; removeEdge(from: T, to: T): void; getVertex(value: T): Vertex$1 | undefined; addVertexToEndOfGraph(value: T, options: { name?: string; excludeFromSort?: boolean; }): void; isPathWithoutDirectEdge(from: Vertex$1, to: Vertex$1): boolean; transitiveReduction(): void; asciiVisualize(): void; sorted: T[]; } declare global { namespace Scheduler { interface Context { } } } type Runnable = (context: T) => void | Promise; interface Schedule$1 { dag: DirectedGraph$1>; tags: Map>; symbols: Map>; } type Options = { schedule: Schedule$1; dag: DirectedGraph$1>; runnable?: Runnable; tag?: Tag; }; type OptionsFn = SingleOptionsFn | MultiOptionsFn; type SingleOptionsFn = ((options: Options) => void) & { __type: 'single' | 'multi'; }; type MultiOptionsFn = ((options: Options) => void) & { __type: 'multi'; }; type Tag = { id: symbol | string; before: Runnable; after: Runnable; }; declare class Vertex { name: string; value: T; inEdges: Set>; outEdges: Set>; excludeFromSort: boolean; get outEdgeCount(): number; get inEdgeCount(): number; constructor(value: T, { name, excludeFromSort }: { name?: string; excludeFromSort?: boolean; }); } declare class DirectedGraph { private _vertices; private _topsort; private _lastAddedVertex; constructor(); exists(value: T): boolean; hasEdge(from: T, to: T): boolean; getVertex(value: T): Vertex | undefined; addVertex(value: T, options: { name?: string; excludeFromSort?: boolean; }): Vertex; excludeFromSort(value: T, exclude: boolean): void; name(value: T, name: string): void; removeVertex(value: T): void; addVertexToEndOfGraph(value: T, options: { name?: string; excludeFromSort?: boolean; }): void; addEdge(from: T, to: T): void; removeEdge(from: T, to: T): void; get sorted(): T[]; topSort(): T[]; isPathWithoutDirectEdge(from: Vertex, to: Vertex): boolean; transitiveReduction(): void; asciiVisualize(): void; } type OptionsObject = { before?: symbol | string | Runnable | (symbol | string | Runnable)[]; after?: symbol | string | Runnable | (symbol | string | Runnable)[]; tag?: symbol | string | (symbol | string)[]; }; type SingleOptionsObject = OptionsObject & { id?: string | symbol; }; declare class Schedule { dag: DirectedGraph>; tags: Map>; symbols: Map>; constructor(); add(runnable: Runnable[], options?: OptionsObject): Schedule; add(runnable: Runnable, options?: SingleOptionsObject): Schedule; has(runnable: Runnable): boolean; run(context: T): Promise>; build(): Schedule; remove(runnable: Runnable): Schedule; debug(): Schedule; createTag(id: symbol | string, options?: OptionsObject): Schedule; removeTag(id: symbol | string): Schedule; hasTag(id: symbol | string): boolean; getRunnable(id: symbol | string): Runnable | undefined; } export { type MultiOptionsFn as M, type OptionsFn as O, type Runnable as R, type SingleOptionsFn as S, type Tag as T, type Schedule$1 as a, Schedule as b, type OptionsObject as c, type SingleOptionsObject as d, type Options as e };