UNPKG

@nestjs/core

Version:

The core of NestJS, a TypeScript framework for Node.js backends: modules, dependency injection and the request pipeline, on Express, Fastify or node:http.

20 lines (19 loc) • 770 B
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; }