@@ -15,6 +15,7 @@ const own = {}.hasOwnProperty
1515/**
1616 * Transform an unknown node.
1717 * @type {Handler }
18+ * @param {Node } node
1819 */
1920function unknown ( h , node ) {
2021 if ( text ( node ) ) {
@@ -26,6 +27,7 @@ function unknown(h, node) {
2627
2728/**
2829 * @type {Handler }
30+ * @param {Node } node
2931 */
3032export function one ( h , node , parent ) {
3133 const type = node && node . type
@@ -69,9 +71,10 @@ function text(node) {
6971
7072/**
7173 * @type {Handler }
74+ * @param {unknown } node
7275 */
7376function returnNode ( h , node ) {
74- // @ts -ignore pass through any unknown node.
77+ // @ts -expect-error pass through any unknown node.
7578 return node . children ? { ...node , children : all ( h , node ) } : node
7679}
7780
@@ -81,14 +84,14 @@ function returnNode(h, node) {
8184 */
8285export function all ( h , parent ) {
8386 /** @type {Array.<Node> } */
84- // @ts -ignore looks like a parent.
87+ // @ts -expect-error looks like a parent.
8588 const nodes = parent . children || [ ]
8689 /** @type {Array.<Content> } */
8790 const values = [ ]
8891 let index = - 1
8992
9093 while ( ++ index < nodes . length ) {
91- // @ts -ignore looks like a parent.
94+ // @ts -expect-error looks like a parent.
9295 const result = one ( h , nodes [ index ] , parent )
9396
9497 if ( result ) {
0 commit comments