Skip to content

Commit

Permalink
fix: missing type definition (#176)
Browse files Browse the repository at this point in the history
* Fix missing MDXContentProps type

* Remove unnecessary `undefined`

Co-authored-by: Kent C. Dodds <[email protected]>
  • Loading branch information
Vlad Moroz and kentcdodds authored Dec 24, 2022
1 parent b96327e commit 2361cd5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 1 addition & 5 deletions src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ import * as _jsx_runtime from 'react/jsx-runtime'
import * as ReactDOM from 'react-dom'

/**
* @typedef {import('mdx/types').MDXComponents} ComponentMap
*/

/**
* @typedef {{[props: string]: unknown, components?: ComponentMap}} MDXContentProps
* @typedef {import('./types').MDXContentProps} MDXContentProps
*/

/**
Expand Down
6 changes: 6 additions & 0 deletions src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@ 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 {GrayMatterOption, Input, GrayMatterFile} from 'gray-matter'
import type {MDXComponents} from 'mdx/types'
import type {VFile,VFileOptions} from 'vfile'

type ESBuildOptions = BuildOptions

export type MDXContentProps = {
[props: string]: unknown
components?: MDXComponents
}

export type BundleMDX<Frontmatter extends {[key: string]: any}> =
| BundleMDXSource<Frontmatter>
| BundleMDXFile<Frontmatter>
Expand Down

0 comments on commit 2361cd5

Please sign in to comment.