Skip to content

Commit 75d4193

Browse files
committed
fix(tree): more types
1 parent 16fee62 commit 75d4193

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/common/util/tree/hasLeaves.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import { TableNode } from '@table-library/react-table-library/types/table';
22

3-
export const hasLeaves = (node: TableNode) => !!node.nodes?.length;
3+
export const hasLeaves = <T extends TableNode>(node: T): boolean => !!node.nodes?.length;

src/common/util/tree/isLeaf.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import { TableNode } from '@table-library/react-table-library/types/table';
22

3-
export const isLeaf = (node: TableNode) => !node.nodes;
3+
export const isLeaf = <T extends TableNode>(node: T): boolean => !node.nodes;

0 commit comments

Comments
 (0)