@ac-essentials/misc-util
    Preparing search index...

    Interface ITreeNode<T, N, C>

    Interface representing a node in a tree data structure.

    A tree node contains a value and references to its child nodes.

    The type of the iterable used for child nodes, which can be synchronous or asynchronous.

    interface ITreeNode<
        T,
        N extends ITreeNode<T, N, C>,
        C extends ITreeNodeChildren<T, N, C>,
    > {
        children: C;
        setValue(value: T): Promisable<void>;
        value(): Promisable<undefined | T>;
    }

    Type Parameters

    • T

      The type of the value contained in the tree node.

    • N extends ITreeNode<T, N, C>

      The type of the tree node itself, extending ITreeNode.

    • C extends ITreeNodeChildren<T, N, C>

    Hierarchy (View Summary)

    Index

    Properties

    Methods

    Properties

    children: C

    Methods