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.

15 lines (14 loc) • 404 B
export declare class TreeNode<T> { readonly value: T; readonly children: Set<TreeNode<T>>; private parent; constructor({ value, parent }: { value: T; parent: TreeNode<T> | null; }); addChild(child: TreeNode<T>): void; removeChild(child: TreeNode<T>): void; relink(parent: TreeNode<T>): void; getDepth(): number; hasCycleWith(target: T): boolean; }