@aximario/json-tree
Version:
把扁平化的数据转换成树形结构的JSON,把树形JSON扁平化
21 lines (20 loc) • 429 B
TypeScript
export interface ConstructOptions {
id?: string;
pid?: string;
children?: string;
}
export declare enum DestructOptionsMode {
all = "all",
leaf = "leaf",
branch = "branch",
nonleaf = "nonleaf",
root = "root"
}
export interface DestructOptions extends ConstructOptions {
mode?: DestructOptionsMode;
}
export declare enum NodeType {
root = "root",
branch = "branch",
leaf = "leaf"
}