Appearance
@vtj
@vtj / node / arrayToTree
arrayToTree<T>(array, id?, parentId?, children?, root?): T[]
T
array
id
parentId
children
root
数组转换为树结构
• T extends Record<string, any>
Record
string
any
T[]
keyof T
string | number
number
packages/base/types/data.d.ts:106