diff --git a/lib/index.js b/lib/index.js index 88d996a..8b906dc 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,17 +1,12 @@ /** - * @typedef {import('hast').Root} Root - * @typedef {import('hast').Content} Content - */ - -/** - * @typedef {Root | Content} Node + * @typedef {import('hast').Nodes} Nodes */ // To do next major: return `undefined`. /** * Get the rank (`1` to `6`) of headings (`h1` to `h6`). * - * @param {Node} node + * @param {Nodes} node * Node to check. * @returns {number | null} * Rank of the heading or `null` if not a heading. diff --git a/package.json b/package.json index b62b819..28b5255 100644 --- a/package.json +++ b/package.json @@ -35,12 +35,12 @@ "index.js" ], "dependencies": { - "@types/hast": "^2.0.0" + "@types/hast": "^3.0.0" }, "devDependencies": { "@types/node": "^20.0.0", "c8": "^8.0.0", - "hastscript": "^7.0.0", + "hastscript": "^8.0.0", "prettier": "^3.0.0", "remark-cli": "^11.0.0", "remark-preset-wooorm": "^9.0.0",