TypeScript type definitions for Treege - a library for handling tree data structures.
npm install --save-dev @getsoren/types-treegeor with other package manager:
yarn add --dev @getsoren/types-treege
bun add --dev @getsoren/types-treege
pnpm add --dev @getsoren/types-treegeimport { TreeNode } from '@getsoren/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