import { GraphNode, NodeDefinition, NodeLike, StatelessGraphNode, StatelessNodeDefinition, StatelessNodeType } from '../../types/graph'; /** * An instance of the [[itemWithId]] node. * See the [[itemWithId]] documentation to find out more. */ export interface ItemWithIdNode extends StatelessGraphNode<'item-with-id', ItemWithIdNodeProperties> { } /** * A definition of the [[itemWithId]] node. * See the [[itemWithId]] documentation to find out more. */ export interface ItemWithIdNodeDefinition extends StatelessNodeDefinition<'item-with-id', ItemWithIdNodeProperties> { } export interface ItemWithIdNodeProperties { id: string; item: NodeDefinition; } /** * The implementation of the [[itemWithId]] node. * See the [[itemWithId]] documentation to find out more. */ export declare const ItemWithIdNodeType: StatelessNodeType<'item-with-id', ItemWithIdNodeProperties>; /** * Creates a new instance of the [[itemWithId]] node, which is a type of a [[NodeDefinition]] used to provide an ID * for an item in an array. This node is internally used by the [[array]] and [[arrayList]] nodes to uniquely identify * an item in an array. */ export declare function itemWithId(item: NodeLike, id: string): ItemWithIdNodeDefinition; /** * Gets the ID of the item by looking for the value in the context of that node. * @param {GraphNode} node Item to get the ID from * @returns {string | undefined} Item ID */ export declare function getItemId(node: GraphNode): string | undefined;