Skip to content

Commit

Permalink
fix(types): explicit declare of typings (#238)
Browse files Browse the repository at this point in the history
* fix(jsx): explicit declare of typings

* fix(jsx): use JSX types instead of React's
  • Loading branch information
muningis authored Mar 5, 2025
1 parent 70cb04f commit 1fac273
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions client/jsx.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from '../dist/client/jsx'
10 changes: 8 additions & 2 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
"main": "./index.js",
"types": "./index.d.ts",
"exports": {
"react": "./react.js",
"jsx": "./jsx.js"
"react": {
"types": "./react.d.ts",
"default": "./react.js"
},
"jsx": {
"types": "./jsx.d.ts",
"default": "./jsx.js"
}
}
}
1 change: 1 addition & 0 deletions client/react.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from '../dist/client/react'
2 changes: 1 addition & 1 deletion src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ type MDXExport<
ExportObject extends {},
Frontmatter = {[key: string]: unknown},
> = {
default: React.FunctionComponent<MDXContentProps>
default: (props: MDXContentProps) => JSX.Element,
frontmatter: Frontmatter
} & ExportObject

Expand Down

0 comments on commit 1fac273

Please sign in to comment.