Skip to content

Commit 76af13d

Browse files
committed
fix unflattern return type
1 parent 726adc7 commit 76af13d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

types/index.d.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,12 @@ declare module 'react-base-table' {
557557

558558
export function hasChildren(data: object): boolean;
559559

560-
export function unflatten<T = any>(array: T[], rootId?: any, dataKey?: string, parentKey?: string): T[];
560+
export function unflatten<T = any>(
561+
array: T[],
562+
rootId?: any,
563+
dataKey?: string,
564+
parentKey?: string
565+
): (T & { children?: T[] })[];
561566

562567
export function flattenOnKeys<T = any>(
563568
tree: T[],

0 commit comments

Comments
 (0)