Skip to content

Commit a491e1b

Browse files
Update types/index.d.ts
Co-authored-by: Christian Murphy <[email protected]>
1 parent 43afc88 commit a491e1b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

types/index.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ declare namespace remove {
2020
* @param options Whether to drop parent nodes if they had children, but all their children were filtered out
2121
* @param test is-compatible test (such as a type)
2222
*/
23-
declare function remove(tree: Node, test?: Test<Node>): Node
24-
declare function remove(
25-
tree: Node,
23+
declare function remove<T extends Node>(tree: T, test?: Test<Node>): T | null
24+
declare function remove<T extends Node>(
25+
tree: T,
2626
options: remove.RemoveOptions = {cascade: true},
2727
test?: Test<Node>
28-
): Node
28+
): T | null
2929

3030
export = remove

0 commit comments

Comments
 (0)