Skip to content

Commit 2361cd5

Browse files
Vlad Morozkentcdodds
andauthored
fix: missing type definition (#176)
* Fix missing MDXContentProps type * Remove unnecessary `undefined` Co-authored-by: Kent C. Dodds <[email protected]>
1 parent b96327e commit 2361cd5

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/client.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@ import * as _jsx_runtime from 'react/jsx-runtime'
33
import * as ReactDOM from 'react-dom'
44

55
/**
6-
* @typedef {import('mdx/types').MDXComponents} ComponentMap
7-
*/
8-
9-
/**
10-
* @typedef {{[props: string]: unknown, components?: ComponentMap}} MDXContentProps
6+
* @typedef {import('./types').MDXContentProps} MDXContentProps
117
*/
128

139
/**

src/types.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,16 @@ import type {Plugin, BuildOptions, Loader} from 'esbuild'
88
import type {ModuleInfo} from '@fal-works/esbuild-plugin-global-externals'
99
import type {ProcessorOptions} from '@mdx-js/esbuild/lib'
1010
import type {GrayMatterOption, Input, GrayMatterFile} from 'gray-matter'
11+
import type {MDXComponents} from 'mdx/types'
1112
import type {VFile,VFileOptions} from 'vfile'
1213

1314
type ESBuildOptions = BuildOptions
1415

16+
export type MDXContentProps = {
17+
[props: string]: unknown
18+
components?: MDXComponents
19+
}
20+
1521
export type BundleMDX<Frontmatter extends {[key: string]: any}> =
1622
| BundleMDXSource<Frontmatter>
1723
| BundleMDXFile<Frontmatter>

0 commit comments

Comments
 (0)