Interface for building tree, TreeNode.

interface TreeSource<D, T> {
    data: D;
    get id(): string;
    get parent(): null | string;
    toNode(): TreeNode<T>;
}

Type Parameters

  • D
  • T = D

Properties

Accessors

Methods

Properties

data: D

Raw data for referencing.

Accessors

  • get parent(): null | string
  • Return source' parent ID. Should return null if parent is root.

    Returns null | string

Methods