@tracktor/types-treege
v0.3.14
Published
TypeScript type definitions for Treege
Readme
@types/treege
TypeScript type definitions for Treege - a library for handling tree data structures.
Installation
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-treegeUsage
import { TreeNode } from '@tracktor/types-treege';
const myTree: TreeNode = {
uuid: "root",
attributes: {
depth: 0,
isRoot: true,
name: "root",
label: "Root Node",
type: "text"
},
children: []
};Available Types
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...
License
MIT
