import { IExtUri } from "./resources.js"; import { URI } from "./uri.js"; export interface IResourceNode { readonly uri: URI; readonly relativePath: string; readonly name: string; readonly element: T | undefined; readonly children: Iterable>; readonly childrenCount: number; readonly parent: IResourceNode | undefined; readonly context: C; get(childName: string): IResourceNode | undefined; } declare class Node implements IResourceNode { readonly uri: URI; readonly relativePath: string; readonly context: C; element: T | undefined; readonly parent: IResourceNode | undefined; private _children; get childrenCount(): number; get children(): Iterable>; get name(): string; constructor(uri: URI, relativePath: string, context: C, element?: T | undefined, parent?: IResourceNode | undefined); get(path: string): Node | undefined; set(path: string, child: Node): void; delete(path: string): void; clear(): void; } export declare class ResourceTree, C> { private extUri; readonly root: Node; static getRoot(node: IResourceNode): IResourceNode; static collect(node: IResourceNode): T[]; static isResourceNode(obj: unknown): obj is IResourceNode; constructor(context: C, rootURI?: URI, extUri?: IExtUri); add(uri: URI, element: T): void; delete(uri: URI): T | undefined; private _delete; clear(): void; getNode(uri: URI): IResourceNode | undefined; } export {};