/**
 * Base dependency graph class.
 */
export declare class Graph {
    private nodes;
    private outgoingEdges;
    private incomingEdges;
    /**
     * Add a node to the graph.
     * @param node Node object.
     */
    addNode(node: Node): void;
    /**
     * Remove a node by name from the graph.
     * @param name Node name.
     */
    removeNode(name: string): void;
    /**
     * Checks to see if the graph contains a Node by name.
     * @param name Node name.
     */
    hasNode(name: string): boolean;
    /**
     * Returns the number of nodes in a graph.
     */
    get size(): number;
    /**
     * Returns the Node instance given a node name.
     * @param name Node name.
     */
    getNode(name: string): Node;
    /**
     *  Adds a node dependence. "from" is dependent on "to"
     *  @param from Node name.
     *  @param to  Node name.
     */
    addDependency(from: string, to: string): void;
    /**
     * Removes a node dependence. "from" is no longer dependent on "to".
     * @param from Node name.
     * @param to  Node name.
     * @todo Test this function.
     */
    removeDependency(from: string, to: string): void;
    /**
     * Get dependency node names for a Node by name. (Required nodes for this node to execute).
     * @param name Node name.
     */
    dependenciesOf(name: string): string[];
    /**
     * Get dependents node names for a Node by name. (Nodes that require this node to complete).
     * @param name Node name.
     */
    dependentsOf(name: string): string[];
    /**
     * Breadth first search.
     */
    traverse(): Promise<any[]>;
    /**
     * Clears the value of a node and the values of dependent nodes
     * @param name Node name.
     */
    clearNodeAndDependents(name: string): Promise<any>;
    /**
     * Resets the graph by resetting each node in the graph.
     */
    reset(): void;
    /**
     * Prints graph nodes and node dependents.
     */
    ls(): void;
}
export declare class Node {
    private _name;
    private _promise;
    private _data?;
    private mutex?;
    private locked;
    constructor(name: string, promise: () => Promise<any>);
    get name(): string;
    /**
     * Await data.
     * @returns A `Promise<T | null>` that resolves when the node's data is ready.
     */
    awaitData(): Promise<any>;
    signalDependenciesReady(): void;
    setData(data: any): void;
    /**
     * Resets node. Clears all node data and resets its mutex.
     */
    reset(): void;
    clearMutex(): void;
    hasData(): boolean;
    clearData(): void;
}
