mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
9 lines
218 B
TypeScript
9 lines
218 B
TypeScript
import { type TreeNode } from "./TreeView.svelte";
|
|
/**
|
|
* Create a nested array from a flat array
|
|
*/
|
|
export function toHierarchy(
|
|
flatArray: TreeNode[] & { pid?: any }[],
|
|
): TreeNode[];
|
|
|
|
export default toHierarchy;
|