We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16fee62 commit 75d4193Copy full SHA for 75d4193
src/common/util/tree/hasLeaves.ts
@@ -1,3 +1,3 @@
1
import { TableNode } from '@table-library/react-table-library/types/table';
2
3
-export const hasLeaves = (node: TableNode) => !!node.nodes?.length;
+export const hasLeaves = <T extends TableNode>(node: T): boolean => !!node.nodes?.length;
src/common/util/tree/isLeaf.ts
-export const isLeaf = (node: TableNode) => !node.nodes;
+export const isLeaf = <T extends TableNode>(node: T): boolean => !node.nodes;
0 commit comments