@@ -15,6 +15,7 @@ const own = {}.hasOwnProperty
15
15
/**
16
16
* Transform an unknown node.
17
17
* @type {Handler }
18
+ * @param {Node } node
18
19
*/
19
20
function unknown ( h , node ) {
20
21
if ( text ( node ) ) {
@@ -26,6 +27,7 @@ function unknown(h, node) {
26
27
27
28
/**
28
29
* @type {Handler }
30
+ * @param {Node } node
29
31
*/
30
32
export function one ( h , node , parent ) {
31
33
const type = node && node . type
@@ -69,9 +71,10 @@ function text(node) {
69
71
70
72
/**
71
73
* @type {Handler }
74
+ * @param {unknown } node
72
75
*/
73
76
function returnNode ( h , node ) {
74
- // @ts -ignore pass through any unknown node.
77
+ // @ts -expect-error pass through any unknown node.
75
78
return node . children ? { ...node , children : all ( h , node ) } : node
76
79
}
77
80
@@ -81,14 +84,14 @@ function returnNode(h, node) {
81
84
*/
82
85
export function all ( h , parent ) {
83
86
/** @type {Array.<Node> } */
84
- // @ts -ignore looks like a parent.
87
+ // @ts -expect-error looks like a parent.
85
88
const nodes = parent . children || [ ]
86
89
/** @type {Array.<Content> } */
87
90
const values = [ ]
88
91
let index = - 1
89
92
90
93
while ( ++ index < nodes . length ) {
91
- // @ts -ignore looks like a parent.
94
+ // @ts -expect-error looks like a parent.
92
95
const result = one ( h , nodes [ index ] , parent )
93
96
94
97
if ( result ) {
0 commit comments