Skip to content

Commit 9b20440

Browse files
Fix type of td, th props
Closes GH-713. Closes GH-714. Reviewed-by: Christian Murphy <christian.murphy.42@gmail.com> Reviewed-by: Titus Wormer <tituswormer@gmail.com>
1 parent a80dfde commit 9b20440

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/ast-to-react.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,17 @@
5858
* @typedef {ComponentPropsWithoutRef<'h1'> & ReactMarkdownProps & {level: number}} HeadingProps
5959
* @typedef {ComponentPropsWithoutRef<'li'> & ReactMarkdownProps & {checked: boolean|null, index: number, ordered: boolean}} LiProps
6060
* @typedef {ComponentPropsWithoutRef<'ol'> & ReactMarkdownProps & {depth: number, ordered: true}} OrderedListProps
61-
* @typedef {ComponentPropsWithoutRef<'table'> & ReactMarkdownProps & {style?: Record<string, unknown>, isHeader: boolean}} TableCellProps
61+
* @typedef {ComponentPropsWithoutRef<'td'> & ReactMarkdownProps & {style?: Record<string, unknown>, isHeader: false}} TableDataCellProps
62+
* @typedef {ComponentPropsWithoutRef<'th'> & ReactMarkdownProps & {style?: Record<string, unknown>, isHeader: true}} TableHeaderCellProps
6263
* @typedef {ComponentPropsWithoutRef<'tr'> & ReactMarkdownProps & {isHeader: boolean}} TableRowProps
6364
* @typedef {ComponentPropsWithoutRef<'ul'> & ReactMarkdownProps & {depth: number, ordered: false}} UnorderedListProps
6465
*
6566
* @typedef {ComponentType<CodeProps>} CodeComponent
6667
* @typedef {ComponentType<HeadingProps>} HeadingComponent
6768
* @typedef {ComponentType<LiProps>} LiComponent
6869
* @typedef {ComponentType<OrderedListProps>} OrderedListComponent
69-
* @typedef {ComponentType<TableCellProps>} TableCellComponent
70+
* @typedef {ComponentType<TableDataCellProps>} TableDataCellComponent
71+
* @typedef {ComponentType<TableHeaderCellProps>} TableHeaderCellComponent
7072
* @typedef {ComponentType<TableRowProps>} TableRowComponent
7173
* @typedef {ComponentType<UnorderedListProps>} UnorderedListComponent
7274
*
@@ -80,8 +82,8 @@
8082
* @property {HeadingComponent|ReactMarkdownNames} h6
8183
* @property {LiComponent|ReactMarkdownNames} li
8284
* @property {OrderedListComponent|ReactMarkdownNames} ol
83-
* @property {TableCellComponent|ReactMarkdownNames} td
84-
* @property {TableCellComponent|ReactMarkdownNames} th
85+
* @property {TableDataCellComponent|ReactMarkdownNames} td
86+
* @property {TableHeaderCellComponent|ReactMarkdownNames} th
8587
* @property {TableRowComponent|ReactMarkdownNames} tr
8688
* @property {UnorderedListComponent|ReactMarkdownNames} ul
8789
*

0 commit comments

Comments
 (0)