2
2
/* @jsxImportSource react */
3
3
4
4
/**
5
- * @typedef { import( '@wooorm/starry-night').Grammar } Grammar
6
- * @typedef { import('estree'). Node} EstreeNode
7
- * @typedef { import('estree').Program } Program
8
- * @typedef { import('hast'). Nodes} HastNodes
9
- * @typedef { import('hast').Root } HastRoot
10
- * @typedef { import('mdast').Nodes } MdastNodes
11
- * @typedef { import('mdast').Root } MdastRoot
12
- * @typedef { import('mdast-util-mdx-jsx').MdxJsxAttribute } MdxJsxAttribute
13
- * @typedef { import( 'mdast-util-mdx-jsx').MdxJsxAttributeValueExpression } MdxJsxAttributeValueExpression
14
- * @typedef { import('mdast-util- mdx-jsx').MdxJsxExpressionAttribute } MdxJsxExpressionAttribute
15
- * @typedef { import('mdx/types.js').MDXModule } MDXModule
16
- * @typedef { import( 'react-error-boundary').FallbackProps } FallbackProperties
17
- * @typedef { import('unified'). PluggableList } PluggableList
18
- * @typedef { import('unist'). Node} UnistNode
5
+ * @import {Grammar} from '@wooorm/starry-night'
6
+ * @import { Node as EstreeNode, Program} from 'estree'
7
+ * @import {Nodes as HastNodes, Root as HastRoot} from 'hast'
8
+ * @import { Nodes as MdastNodes, Root as MdastRoot} from 'mdast'
9
+ * @import {
10
+ MdxJsxAttribute,
11
+ MdxJsxAttributeValueExpression,
12
+ MdxJsxExpressionAttribute
13
+ * } from 'mdast-util-mdx-jsx'
14
+ * @import {MDXModule} from ' mdx/types.js'
15
+ * @import {ReactNode} from 'react'
16
+ * @import {FallbackProps} from 'react-error-boundary'
17
+ * @import { PluggableList} from 'unified'
18
+ * @import { Node as UnistNode} from 'unist'
19
19
*/
20
20
21
21
/**
35
35
* OK.
36
36
* @property {true } ok
37
37
* Whether OK.
38
- * @property {JSX.Element } value
38
+ * @property {ReactNode } value
39
39
* Result.
40
40
*
41
41
* @typedef {EvalNok | EvalOk } EvalResult
@@ -315,7 +315,7 @@ function Playground() {
315
315
const scope = formatMarkdown ? 'text.md' : 'source.mdx'
316
316
// Cast to actual value.
317
317
const compiledResult = /** @type {EvalResult | undefined } */ ( evalResult )
318
- /** @type {JSX.Element | undefined } */
318
+ /** @type {ReactNode | undefined } */
319
319
let display
320
320
321
321
if ( compiledResult ) {
@@ -579,9 +579,9 @@ function Playground() {
579
579
580
580
/**
581
581
*
582
- * @param {Readonly<FallbackProperties > } properties
582
+ * @param {Readonly<FallbackProps > } properties
583
583
* Properties.
584
- * @returns {JSX.Element }
584
+ * @returns {ReactNode }
585
585
* Element.
586
586
*/
587
587
function ErrorFallback ( properties ) {
@@ -601,7 +601,7 @@ function ErrorFallback(properties) {
601
601
/**
602
602
* @param {DisplayProperties } properties
603
603
* Properties.
604
- * @returns {JSX.Element }
604
+ * @returns {ReactNode }
605
605
* Element.
606
606
*/
607
607
function DisplayError ( properties ) {
0 commit comments