File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -41,9 +41,7 @@ export function toMarkdown(tree, options = {}) {
41
41
/** @type {Handle } */
42
42
context . handle = zwitch ( 'type' , {
43
43
invalid,
44
- // @ts -expect-error: hush.
45
44
unknown,
46
- // @ts -expect-error: hush.
47
45
handlers : context . handlers
48
46
} )
49
47
@@ -78,16 +76,19 @@ export function toMarkdown(tree, options = {}) {
78
76
/**
79
77
* @type {Handle }
80
78
* @param {unknown } value
79
+ * @returns {never }
81
80
*/
82
81
function invalid ( value ) {
83
82
throw new Error ( 'Cannot handle value `' + value + '`, expected node' )
84
83
}
85
84
86
85
/**
87
86
* @type {Handle }
88
- * @param {Node } node
87
+ * @param {unknown } node
88
+ * @returns {never }
89
89
*/
90
90
function unknown ( node ) {
91
+ // @ts -expect-error: fine.
91
92
throw new Error ( 'Cannot handle unknown node `' + node . type + '`' )
92
93
}
93
94
You can’t perform that action at this time.
0 commit comments