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 = {}) {
4141 /** @type {Handle } */
4242 context . handle = zwitch ( 'type' , {
4343 invalid,
44- // @ts -expect-error: hush.
4544 unknown,
46- // @ts -expect-error: hush.
4745 handlers : context . handlers
4846 } )
4947
@@ -78,16 +76,19 @@ export function toMarkdown(tree, options = {}) {
7876/**
7977 * @type {Handle }
8078 * @param {unknown } value
79+ * @returns {never }
8180 */
8281function invalid ( value ) {
8382 throw new Error ( 'Cannot handle value `' + value + '`, expected node' )
8483}
8584
8685/**
8786 * @type {Handle }
88- * @param {Node } node
87+ * @param {unknown } node
88+ * @returns {never }
8989 */
9090function unknown ( node ) {
91+ // @ts -expect-error: fine.
9192 throw new Error ( 'Cannot handle unknown node `' + node . type + '`' )
9293}
9394
You can’t perform that action at this time.
0 commit comments