7
7
* @import {IScriptSnapshot} from 'typescript'
8
8
* @import {Processor} from 'unified'
9
9
* @import {VFileMessage} from 'vfile-message'
10
- * @import {VirtualCodePlugin, VirtualCodePluginObject } from './plugins/plugin.js'
10
+ * @import {VirtualCodePlugin} from './plugins/plugin.js'
11
11
*/
12
12
13
13
import { createVisitors } from 'estree-util-scope'
@@ -19,12 +19,10 @@ import {isInjectableComponent, isInjectableEstree} from './jsx-utils.js'
19
19
/**
20
20
* Render the content that should be prefixed to the embedded JavaScript file.
21
21
*
22
- * @param {boolean } tsCheck
23
- * If true, insert a `@check-js` comment into the virtual JavaScript code.
24
22
* @param {string } jsxImportSource
25
23
* The string to use for the JSX import source tag.
26
24
*/
27
- const jsPrefix = ( tsCheck , jsxImportSource ) => `/* @jsxRuntime automatic
25
+ const jsPrefix = ( jsxImportSource ) => `/* @jsxRuntime automatic
28
26
@jsxImportSource ${ jsxImportSource } */
29
27
`
30
28
@@ -98,7 +96,7 @@ export default function MDXContent(props) {
98
96
99
97
const jsxIndent = '\n '
100
98
101
- const fallback = jsPrefix ( false , 'react' ) + componentStart ( false ) + componentEnd
99
+ const fallback = jsPrefix ( 'react' ) + componentStart ( false ) + componentEnd
102
100
103
101
/**
104
102
* Visit an mdast tree with and enter and exit callback.
@@ -244,7 +242,7 @@ function getEmbeddedCodes(
244
242
) {
245
243
let hasAwait = false
246
244
let hasImports = false
247
- let esm = jsPrefix ( checkMdx , jsxImportSource )
245
+ let esm = jsPrefix ( jsxImportSource )
248
246
let jsx = ''
249
247
let jsxVariables = ''
250
248
let markdown = ''
0 commit comments