88 * @typedef {import('mdast-util-to-markdown').Handle } ToMarkdownHandle
99 * @typedef {import('mdast-util-to-markdown').Map } ToMarkdownMap
1010 * @typedef {import('estree-jsx').Program } Program
11- * @typedef {import('./complex-types').MDXJsxAttributeValueExpression } MDXJsxAttributeValueExpression
12- * @typedef {import('./complex-types').MDXJsxAttribute } MDXJsxAttribute
13- * @typedef {import('./complex-types').MDXJsxExpressionAttribute } MDXJsxExpressionAttribute
14- * @typedef {import('./complex-types').MDXJsxFlowElement } MDXJsxFlowElement
15- * @typedef {import('./complex-types').MDXJsxTextElement } MDXJsxTextElement
16- * @typedef {{name: string|null, attributes: (MDXJsxAttribute|MDXJsxExpressionAttribute)[], close?: boolean, selfClosing?: boolean, start: Token['start'], end: Token['start']} } Tag
11+ * @typedef {import('./complex-types').MdxJsxAttributeValueExpression } MdxJsxAttributeValueExpression
12+ * @typedef {import('./complex-types').MdxJsxAttribute } MdxJsxAttribute
13+ * @typedef {import('./complex-types').MdxJsxExpressionAttribute } MdxJsxExpressionAttribute
14+ * @typedef {import('./complex-types').MdxJsxFlowElement } MdxJsxFlowElement
15+ * @typedef {import('./complex-types').MdxJsxTextElement } MdxJsxTextElement
16+ * @typedef {{name: string|null, attributes: (MdxJsxAttribute|MdxJsxExpressionAttribute)[], close?: boolean, selfClosing?: boolean, start: Token['start'], end: Token['start']} } Tag
17+ */
18+
19+ /**
20+ * Legacy names:
21+ *
22+ * @typedef {MdxJsxAttributeValueExpression } MDXJsxAttributeValueExpression
23+ * @typedef {MdxJsxAttribute } MDXJsxAttribute
24+ * @typedef {MdxJsxExpressionAttribute } MDXJsxExpressionAttribute
25+ * @typedef {MdxJsxFlowElement } MDXJsxFlowElement
26+ * @typedef {MdxJsxTextElement } MDXJsxTextElement
1727 */
1828
1929import { parseEntities } from 'parse-entities'
@@ -197,7 +207,7 @@ function enterMdxJsxTagExpressionAttribute(token) {
197207/** @type {FromMarkdownHandle } */
198208function exitMdxJsxTagExpressionAttribute ( token ) {
199209 const tag = /** @type {Tag } */ ( this . getData ( 'mdxJsxTag' ) )
200- const tail = /** @type {MDXJsxExpressionAttribute } */ (
210+ const tail = /** @type {MdxJsxExpressionAttribute } */ (
201211 tag . attributes [ tag . attributes . length - 1 ]
202212 )
203213 /** @type {Program|undefined } */
@@ -214,7 +224,7 @@ function exitMdxJsxTagExpressionAttribute(token) {
214224/** @type {FromMarkdownHandle } */
215225function exitMdxJsxTagAttributeNamePrimary ( token ) {
216226 const tag = /** @type {Tag } */ ( this . getData ( 'mdxJsxTag' ) )
217- const node = /** @type {MDXJsxAttribute } */ (
227+ const node = /** @type {MdxJsxAttribute } */ (
218228 tag . attributes [ tag . attributes . length - 1 ]
219229 )
220230 node . name = this . sliceSerialize ( token )
@@ -223,7 +233,7 @@ function exitMdxJsxTagAttributeNamePrimary(token) {
223233/** @type {FromMarkdownHandle } */
224234function exitMdxJsxTagAttributeNameLocal ( token ) {
225235 const tag = /** @type {Tag } */ ( this . getData ( 'mdxJsxTag' ) )
226- const node = /** @type {MDXJsxAttribute } */ (
236+ const node = /** @type {MdxJsxAttribute } */ (
227237 tag . attributes [ tag . attributes . length - 1 ]
228238 )
229239 node . name += ':' + this . sliceSerialize ( token )
@@ -241,10 +251,10 @@ function exitMdxJsxTagAttributeValueLiteral() {
241251/** @type {FromMarkdownHandle } */
242252function exitMdxJsxTagAttributeValueExpression ( token ) {
243253 const tag = /** @type {Tag } */ ( this . getData ( 'mdxJsxTag' ) )
244- const tail = /** @type {MDXJsxAttribute } */ (
254+ const tail = /** @type {MdxJsxAttribute } */ (
245255 tag . attributes [ tag . attributes . length - 1 ]
246256 )
247- /** @type {MDXJsxAttributeValueExpression } */
257+ /** @type {MdxJsxAttributeValueExpression } */
248258 const node = { type : 'mdxJsxAttributeValueExpression' , value : this . resume ( ) }
249259 /** @type {Program|undefined } */
250260 // @ts -expect-error: custom.
@@ -324,7 +334,7 @@ function serializeAbbreviatedTag(tag) {
324334
325335/**
326336 * @type {ToMarkdownHandle }
327- * @param {MDXJsxFlowElement|MDXJsxTextElement } node
337+ * @param {MdxJsxFlowElement|MdxJsxTextElement } node
328338 */
329339// eslint-disable-next-line complexity
330340function mdxElement ( node , _ , context ) {
0 commit comments