Skip to content

Commit

Permalink
Fix type of td, th props
Browse files Browse the repository at this point in the history
Closes GH-713.
Closes GH-714.

Reviewed-by: Christian Murphy <christian.murphy.42@gmail.com>
Reviewed-by: Titus Wormer <tituswormer@gmail.com>
  • Loading branch information
lucasassisrosa committed Dec 1, 2022
1 parent a80dfde commit 9b20440
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/ast-to-react.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,17 @@
* @typedef {ComponentPropsWithoutRef<'h1'> & ReactMarkdownProps & {level: number}} HeadingProps
* @typedef {ComponentPropsWithoutRef<'li'> & ReactMarkdownProps & {checked: boolean|null, index: number, ordered: boolean}} LiProps
* @typedef {ComponentPropsWithoutRef<'ol'> & ReactMarkdownProps & {depth: number, ordered: true}} OrderedListProps
* @typedef {ComponentPropsWithoutRef<'table'> & ReactMarkdownProps & {style?: Record<string, unknown>, isHeader: boolean}} TableCellProps
* @typedef {ComponentPropsWithoutRef<'td'> & ReactMarkdownProps & {style?: Record<string, unknown>, isHeader: false}} TableDataCellProps
* @typedef {ComponentPropsWithoutRef<'th'> & ReactMarkdownProps & {style?: Record<string, unknown>, isHeader: true}} TableHeaderCellProps
* @typedef {ComponentPropsWithoutRef<'tr'> & ReactMarkdownProps & {isHeader: boolean}} TableRowProps
* @typedef {ComponentPropsWithoutRef<'ul'> & ReactMarkdownProps & {depth: number, ordered: false}} UnorderedListProps
*
* @typedef {ComponentType<CodeProps>} CodeComponent
* @typedef {ComponentType<HeadingProps>} HeadingComponent
* @typedef {ComponentType<LiProps>} LiComponent
* @typedef {ComponentType<OrderedListProps>} OrderedListComponent
* @typedef {ComponentType<TableCellProps>} TableCellComponent
* @typedef {ComponentType<TableDataCellProps>} TableDataCellComponent
* @typedef {ComponentType<TableHeaderCellProps>} TableHeaderCellComponent
* @typedef {ComponentType<TableRowProps>} TableRowComponent
* @typedef {ComponentType<UnorderedListProps>} UnorderedListComponent
*
Expand All @@ -80,8 +82,8 @@
* @property {HeadingComponent|ReactMarkdownNames} h6
* @property {LiComponent|ReactMarkdownNames} li
* @property {OrderedListComponent|ReactMarkdownNames} ol
* @property {TableCellComponent|ReactMarkdownNames} td
* @property {TableCellComponent|ReactMarkdownNames} th
* @property {TableDataCellComponent|ReactMarkdownNames} td
* @property {TableHeaderCellComponent|ReactMarkdownNames} th
* @property {TableRowComponent|ReactMarkdownNames} tr
* @property {UnorderedListComponent|ReactMarkdownNames} ul
*
Expand Down

0 comments on commit 9b20440

Please sign in to comment.