/** @packageDocumentation * @module Hierarchies */ import { Node, NodeJSON } from "./Node"; /** * Serialized [[NodePathElement]] JSON representation. * @public */ export interface NodePathElementJSON { node: NodeJSON; index: number; isMarked?: boolean; children: NodePathElementJSON[]; filteringData?: NodePathFilteringDataJSON; } /** * Describes a single step in the nodes path. * @public */ export interface NodePathElement { /** Node instance */ node: Node; /** Node index */ index: number; /** Is this element part of the marked path */ isMarked?: boolean; /** Child path elements */ children: NodePathElement[]; /** Additional filtering-related information */ filteringData?: NodePathFilteringData; } /** @public */ export declare namespace NodePathElement { /** Serialize given [[NodePathElement]] to JSON */ function toJSON(npe: NodePathElement): NodePathElementJSON; /** Deserialize [[NodePathElement]] from JSON */ function fromJSON(json: NodePathElementJSON | string): NodePathElement; /** * Reviver function that can be used as a second argument for * `JSON.parse` method when parsing [[NodePathElement]] objects. * * @internal */ function reviver(key: string, value: any): any; /** * Deserialize [[NodePathElement]] list from JSON * @param json JSON or JSON serialized to string to deserialize from * @returns Deserialized [[NodePathElement]] list * * @internal */ function listFromJSON(json: NodePathElementJSON[] | string): NodePathElement[]; /** * Reviver function that can be used as a second argument for * `JSON.parse` method when parsing [[NodePathElement]][] objects. * * @internal */ function listReviver(key: string, value: any): any; } /** * Serialized [[NodePathFilteringData]] JSON representation. * @public */ export interface NodePathFilteringDataJSON { occurances: number; childrenOccurances: number; } /** * Data related to node hierarchy filtering * @public */ export interface NodePathFilteringData { /** Number of filter matches in the current element */ matchesCount: number; /** Number of filter matches in the current element's children (recursively) */ childMatchesCount: number; } /** @public */ export declare namespace NodePathFilteringData { /** Serialize given [[NodePathFilteringData]] to JSON */ function toJSON(npfd: NodePathFilteringData): NodePathFilteringDataJSON; /** Deserialize [[NodePathFilteringData]] from JSON */ function fromJSON(json: NodePathFilteringDataJSON): NodePathFilteringData; } //# sourceMappingURL=NodePathElement.d.ts.map