@@ -24,7 +24,7 @@ const createQueries = () => {
2424 * Sanitizes the YAML source by returning the inner YAML content
2525 * and then parsing it into an API Metadata object and updating the current Metadata
2626 *
27- * @param {import('mdast').Html } node A HTML node containing the YAML content
27+ * @param {import('@types/ mdast').Html } node A HTML node containing the YAML content
2828 * @param {ReturnType<import('./metadata.mjs').default> } apiEntryMetadata The API entry Metadata
2929 */
3030 const addYAMLMetadata = ( node , apiEntryMetadata ) => {
@@ -42,7 +42,7 @@ const createQueries = () => {
4242 /**
4343 * Parse a Heading node into metadata and updates the current metadata
4444 *
45- * @param {import('mdast').Heading } node A Markdown heading node
45+ * @param {import('@types/ mdast').Heading } node A Markdown heading node
4646 * @param {ReturnType<import('./metadata.mjs').default> } apiEntryMetadata The API entry Metadata
4747 */
4848 const setHeadingMetadata = ( node , apiEntryMetadata ) => {
@@ -57,7 +57,7 @@ const createQueries = () => {
5757 /**
5858 * Updates a Markdown link into a HTML link for API docs
5959 *
60- * @param {import('mdast').Link } node A Markdown link node
60+ * @param {import('@types/ mdast').Link } node A Markdown link node
6161 */
6262 const updateMarkdownLink = node => {
6363 node . url = node . url . replace (
@@ -72,8 +72,8 @@ const createQueries = () => {
7272 * Updates a Markdown text containing an API type reference
7373 * into a Markdown link referencing to the correct API docs
7474 *
75- * @param {import('mdast').Text } node A Markdown link node
76- * @param {import('mdast').Parent } parent The parent node
75+ * @param {import('@types/ mdast').Text } node A Markdown link node
76+ * @param {import('@types/ mdast').Parent } parent The parent node
7777 */
7878 const updateTypeReference = ( node , parent ) => {
7979 const replacedTypes = node . value
@@ -104,8 +104,8 @@ const createQueries = () => {
104104 /**
105105 * Updates a Markdown Link Reference into an actual Link to the Definition
106106 *
107- * @param {import('mdast').LinkReference } node A link reference node
108- * @param {Array<import('mdast').Definition> } definitions The Definitions of the API Doc
107+ * @param {import('@types/ mdast').LinkReference } node A link reference node
108+ * @param {Array<import('@types/ mdast').Definition> } definitions The Definitions of the API Doc
109109 */
110110 const updateLinkReference = ( node , definitions ) => {
111111 const definition = definitions . find (
@@ -121,7 +121,7 @@ const createQueries = () => {
121121 /**
122122 * Parses a Stability Index Entry and updates the current Metadata
123123 *
124- * @param {import('mdast').Blockquote } node Thead Link Reference Node
124+ * @param {import('@types/ mdast').Blockquote } node Thead Link Reference Node
125125 * @param {ReturnType<import('./metadata.mjs').default> } apiEntryMetadata The API entry Metadata
126126 */
127127 const addStabilityMetadata = ( node , apiEntryMetadata ) => {
@@ -204,44 +204,44 @@ createQueries.QUERIES = {
204204
205205createQueries . UNIST = {
206206 /**
207- * @param {import('mdast').Blockquote } blockquote
207+ * @param {import('@types/ mdast').Blockquote } blockquote
208208 * @returns {boolean }
209209 */
210210 isStabilityNode : ( { type, children } ) =>
211211 type === 'blockquote' &&
212212 createQueries . QUERIES . stabilityIndex . test ( transformNodesToString ( children ) ) ,
213213 /**
214- * @param {import('mdast').Html } html
214+ * @param {import('@types/ mdast').Html } html
215215 * @returns {boolean }
216216 */
217217 isYamlNode : ( { type, value } ) =>
218218 type === 'html' && createQueries . QUERIES . yamlInnerContent . test ( value ) ,
219219 /**
220- * @param {import('mdast').Text } text
220+ * @param {import('@types/ mdast').Text } text
221221 * @returns {boolean }
222222 */
223223 isTextWithType : ( { type, value } ) =>
224224 type === 'text' && createQueries . QUERIES . normalizeTypes . test ( value ) ,
225225 /**
226- * @param {import('mdast').Html } html
226+ * @param {import('@types/ mdast').Html } html
227227 * @returns {boolean }
228228 */
229229 isHtmlWithType : ( { type, value } ) =>
230230 type === 'html' && createQueries . QUERIES . linksWithTypes . test ( value ) ,
231231 /**
232- * @param {import('mdast').Link } link
232+ * @param {import('@types/ mdast').Link } link
233233 * @returns {boolean }
234234 */
235235 isMarkdownUrl : ( { type, url } ) =>
236236 type === 'link' && createQueries . QUERIES . markdownUrl . test ( url ) ,
237237 /**
238- * @param {import('mdast').Heading } heading
238+ * @param {import('@types/ mdast').Heading } heading
239239 * @returns {boolean }
240240 */
241241 isHeading : ( { type, depth } ) =>
242242 type === 'heading' && depth >= 1 && depth <= 5 ,
243243 /**
244- * @param {import('mdast').LinkReference } linkReference
244+ * @param {import('@types/ mdast').LinkReference } linkReference
245245 * @returns {boolean }
246246 */
247247 isLinkReference : ( { type, identifier } ) =>
0 commit comments