UNPKG

@itwin/presentation-hierarchies

Version:

A package for creating hierarchies based on data in iTwin.js iModels.

29 lines 1.41 kB
import { GenericNodeKey, IModelInstanceKey } from "./HierarchyNodeKey.js"; /** * An identifier that can be used to identify either an ECInstance or a generic node. * * This is different from `HierarchyNodeKey` - the key can represent more types of nodes and, * in case of `InstancesNodeKey`, contains information about all instances the node represents. * `HierarchyNodeIdentifier`, on the other hand, is used for matching a node, so it only needs * to contain information about a single instance. * * @public */ export type HierarchyNodeIdentifier = IModelInstanceKey | GenericNodeKey; /** @public */ export declare namespace HierarchyNodeIdentifier { /** Checks whether the given identifier is an instance node identifier */ function isInstanceNodeIdentifier(id: HierarchyNodeIdentifier): id is IModelInstanceKey; /** Checks whether the given identifier is a generic node identifier */ function isGenericNodeIdentifier(id: HierarchyNodeIdentifier): id is GenericNodeKey; /** Checks two identifiers for equality */ function equal(lhs: HierarchyNodeIdentifier, rhs: HierarchyNodeIdentifier): boolean; } /** * A path of hierarchy node identifiers, typically used to describe a path from root down * to specific node deep in the hierarchy. * * @public */ export type HierarchyNodeIdentifiersPath = HierarchyNodeIdentifier[]; //# sourceMappingURL=HierarchyNodeIdentifier.d.ts.map