@platform/state
Version:
A small, simple, strongly typed, [rx/observable] state-machine.
21 lines (20 loc) • 855 B
TypeScript
import { t } from '../common';
declare type Node = t.ITreeNode;
export declare class TreeQuery<T extends Node = Node> implements t.ITreeQuery<T> {
static create<T extends Node = Node>(args: T | t.ITreeQueryArgs<T>): t.ITreeQuery<T>;
static children<T extends Node = Node>(of?: T, fn?: t.TreeChildrenVisitor<T> | t.TreeChildrenOptions, options?: t.TreeChildrenOptions): T[];
static hasChild(parent?: Node, child?: t.NodeIdentifier): boolean;
static childAt<T extends Node>(index: number, parent?: T): T;
private constructor();
readonly root: T;
readonly namespace: string;
walkDown: t.TreeWalkDown<T>;
walkUp: t.TreeWalkUp<T>;
find: t.TreeFind<T>;
findById: t.TreeFindById<T>;
parent: t.TreeParent<T>;
ancestor: t.TreeAncestor<T>;
depth: t.TreeDepth<T>;
exists: t.TreeNodeExists<T>;
}
export {};