Skip to content

Commit

Permalink
fix: type error in options parameter of mdxOptions (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
CottonCandyZ committed Mar 27, 2024
1 parent 8f306c8 commit 2552974
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"mdx-test-data": "^1.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"remark-mdx-images": "^2.0.0",
"remark-mdx-images": "^3.0.0",
"typescript": "^5.2.2",
"uvu": "^0.5.6"
},
Expand Down
6 changes: 3 additions & 3 deletions src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import type {Plugin, BuildOptions, Loader} from 'esbuild'
import type {ModuleInfo} from '@fal-works/esbuild-plugin-global-externals'
import type {ProcessorOptions} from '@mdx-js/esbuild/lib'
import type {Options} from '@mdx-js/esbuild/lib'
import type {GrayMatterOption, Input, GrayMatterFile} from 'gray-matter'
import type {MDXComponents} from 'mdx/types'
import type {VFile,VFileOptions} from 'vfile'
Expand Down Expand Up @@ -88,9 +88,9 @@ type BundleMDXOptions<Frontmatter> = {
* ```
*/
mdxOptions?: (
options: ProcessorOptions,
options: Options,
frontmatter: Frontmatter,
) => ProcessorOptions
) => Options
/**
* This allows you to modify the built-in esbuild configuration. This can be
* especially helpful for specifying the compilation target.
Expand Down
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"target": "ES2020",
"module": "ES2020",
"allowJs": true,
"checkJs": true
"checkJs": true,
"lib": [
"ES2021.String"
]
}
}

0 comments on commit 2552974

Please sign in to comment.