Skip to content

Commit 1d2d01a

Browse files
committed
fix(utils): return type
1 parent 63d4943 commit 1d2d01a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/utils/src/array.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,13 +214,13 @@ export function getArrayChildrenByParentId<T extends object>(
214214
* Get all descendant item ids based on parent id
215215
* @param data 待处理的数组
216216
* @param parentId 父级节点id
217-
* @param [key]
217+
* @param key 标识字段,默认 id | Identifier field, default id
218218
*/
219219
export function getArrayChildrenIdByParentId(
220220
data: Record<string, any>[] | undefined,
221221
parentId: string,
222222
key = 'id',
223-
): Record<string, any>[] | undefined {
223+
): any[] | undefined {
224224
const children = getArrayChildrenByParentId(data, parentId, key);
225225
if (!Array.isArray(children)) {
226226
return;

0 commit comments

Comments
 (0)