Skip to content

Commit 2552974

Browse files
authored
fix: type error in options parameter of mdxOptions (#225)
1 parent 8f306c8 commit 2552974

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
"mdx-test-data": "^1.0.1",
7070
"react": "^18.2.0",
7171
"react-dom": "^18.2.0",
72-
"remark-mdx-images": "^2.0.0",
72+
"remark-mdx-images": "^3.0.0",
7373
"typescript": "^5.2.2",
7474
"uvu": "^0.5.6"
7575
},

src/types.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import type {Plugin, BuildOptions, Loader} from 'esbuild'
88
import type {ModuleInfo} from '@fal-works/esbuild-plugin-global-externals'
9-
import type {ProcessorOptions} from '@mdx-js/esbuild/lib'
9+
import type {Options} from '@mdx-js/esbuild/lib'
1010
import type {GrayMatterOption, Input, GrayMatterFile} from 'gray-matter'
1111
import type {MDXComponents} from 'mdx/types'
1212
import type {VFile,VFileOptions} from 'vfile'
@@ -88,9 +88,9 @@ type BundleMDXOptions<Frontmatter> = {
8888
* ```
8989
*/
9090
mdxOptions?: (
91-
options: ProcessorOptions,
91+
options: Options,
9292
frontmatter: Frontmatter,
93-
) => ProcessorOptions
93+
) => Options
9494
/**
9595
* This allows you to modify the built-in esbuild configuration. This can be
9696
* especially helpful for specifying the compilation target.

tsconfig.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
"target": "ES2020",
66
"module": "ES2020",
77
"allowJs": true,
8-
"checkJs": true
8+
"checkJs": true,
9+
"lib": [
10+
"ES2021.String"
11+
]
912
}
1013
}

0 commit comments

Comments
 (0)