Skip to content

Commit cbe7d93

Browse files
committed
fix(tree-view-node): correctly type computeTreeLeafDepth export
1 parent 2989753 commit cbe7d93

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/TreeView/TreeViewNode.svelte

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<script context="module">
22
/**
33
* Computes the depth of a tree leaf node relative to <ul role="tree" />
4-
* @param {HTMLLIElement} node
5-
* @returns {number} depth
4+
* @type {(node: HTMLLIElement) => number}
65
*/
76
export function computeTreeLeafDepth(node) {
87
let depth = 0;

types/TreeView/TreeViewNode.svelte.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { SvelteComponentTyped } from "svelte";
33
/**
44
* Computes the depth of a tree leaf node relative to <ul role="tree" />
55
*/
6-
export declare function computeTreeLeafDepth(): any;
6+
export declare function computeTreeLeafDepth(node: HTMLLIElement): number;
77
export type TreeNodeId = string | number;
88

99
export type TreeViewNodeProps = {

0 commit comments

Comments
 (0)