import { Module } from '../module.js';
/**
 * Depth of every module the root module (depth 1) imports, directly or not:
 * the length of the longest import path that leads to it. A module is then
 * deeper than every module importing it, whichever path reached it first. An
 * import that closes a cycle (with `forwardRef()`) is left out, as no depth
 * could satisfy it.
 */
export declare class TopologyTree {
    private readonly depths;
    constructor(moduleRef: Module);
    walk(callback: (value: Module, depth: number) => void): void;
    /**
     * Reverse post-order of a depth-first traversal: every module comes before
     * its imports, except for an import back to a module still being traversed
     * (a cycle).
     */
    private sortTopologically;
}
