Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion docs/docs/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,16 @@ Our packages are typed with [TypeScript][].
For types to work,
the `JSX` namespace must be typed.
This is done by installing and using the types of your framework,
such as [`@types/react`][definitely-typed-react].
such as [`@types/react`][definitely-typed-react],
then augmenting the `mdx/types.js` module.

```ts twoslash path="example.ts"
import * as React from 'react'

declare module 'mdx/types.js' {
export import JSX = React.JSX
}
```

To enable types for imported `.mdx`, `.md`, etc.,
install and use [`@types/mdx`][definitely-typed-mdx].
Expand Down