Skip to content

Commit c5716d3

Browse files
committed
Fix types to allow null
1 parent 08a7375 commit c5716d3

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

index.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
*
1313
* @callback TestFunctionAnything
1414
* @param {Element} element
15-
* @param {number} [index]
16-
* @param {Parent} [parent]
15+
* @param {number|null|undefined} [index]
16+
* @param {Parent|null|undefined} [parent]
1717
* @returns {boolean|void}
1818
*/
1919

@@ -23,8 +23,8 @@
2323
* @template {Element} X
2424
* @callback TestFunctionPredicate
2525
* @param {X} element
26-
* @param {number} [index]
27-
* @param {Parent} [parent]
26+
* @param {number|null|undefined} [index]
27+
* @param {Parent|null|undefined} [parent]
2828
* @returns {element is X}
2929
*/
3030

@@ -33,8 +33,8 @@
3333
*
3434
* @callback AssertAnything
3535
* @param {unknown} [node]
36-
* @param {number} [index]
37-
* @param {Parent} [parent]
36+
* @param {number|null|undefined} [index]
37+
* @param {Parent|null|undefined} [parent]
3838
* @returns {boolean}
3939
*/
4040

@@ -44,8 +44,8 @@
4444
* @template {Element} Y
4545
* @callback AssertPredicate
4646
* @param {unknown} [node]
47-
* @param {number} [index]
48-
* @param {Parent} [parent]
47+
* @param {number|null|undefined} [index]
48+
* @param {Parent|null|undefined} [parent]
4949
* @returns {node is Y}
5050
*/
5151

0 commit comments

Comments
 (0)