TypeScript type definitions for Treege - a library for handling tree data structures.
npm install --save-dev @tracktor/types-treege
or with other package manager:
yarn add --dev @tracktor/types-treege
bun add --dev @types/treege
pnpm add --dev @tracktor/types-treege
import { TreeNode } from '@tracktor/types-treege';
const myTree: TreeNode = {
uuid: "root",
attributes: {
depth: 0,
isRoot: true,
name: "root",
label: "Root Node",
type: "text"
},
children: []
};
This library provides the following type definitions:
TreeNode
: Main structure representing a node in the treeTreeNodeFieldAttributes
: Attributes for field-type nodesTreeNodeValueAttributes
: Attributes for value-type nodesFieldType
: Supported field typesTreeValues
: Value options for selection fieldsRoute
: API configuration for autocompleteBackendConfig
: Backend configurationTreePath
: Representation of a path in the tree- And other auxiliary types...
MIT