import { BaseImplementation } from './base.js'; interface ItemElement { item: T; dependencies: T[]; visited: boolean; } /** * A topological sort implementation based on arrays. * * @author Marc J. Schmidt */ export declare class ArraySort extends BaseImplementation { protected elements: Map>; protected sorted: T[]; set(elements: Map): void; add(element: T, dependencies?: T[]): void; reset(): void; /** * Visits element and handles it dependencies, queues to internal sorted list in the right order. * * @throws CircularDependencyException if a circular dependency has been found * @throws ElementNotFoundException if a dependency can not be found */ protected visit(element: ItemElement, parents?: Set): void; protected addToList(element: ItemElement): void; /** * Sorts dependencies and returns internal used data structure. * * @throws CircularDependencyException if a circular dependency has been found * @throws ElementNotFoundException if a dependency can not be found */ sort(): T[]; protected doSort(): T[]; } export {};