|
3 | 3 | * @typedef {import('react').ComponentType<T>} ComponentType<T>
|
4 | 4 | */
|
5 | 5 |
|
| 6 | +/** |
| 7 | + * @template T |
| 8 | + * @typedef {import('react').ComponentPropsWithoutRef<T>} ComponentPropsWithoutRef<T> |
| 9 | + */ |
| 10 | + |
6 | 11 | /**
|
7 | 12 | * @typedef {import('react').ReactNode} ReactNode
|
8 | 13 | * @typedef {import('unist').Position} Position
|
|
49 | 54 | *
|
50 | 55 | * To do: is `data-sourcepos` typeable?
|
51 | 56 | *
|
52 |
| - * @typedef {JSX.IntrinsicElements['code'] & ReactMarkdownProps & {inline?: boolean}} CodeProps |
53 |
| - * @typedef {JSX.IntrinsicElements['h1'] & ReactMarkdownProps & {level: number}} HeadingProps |
54 |
| - * @typedef {JSX.IntrinsicElements['li'] & ReactMarkdownProps & {checked: boolean|null, index: number, ordered: boolean}} LiProps |
55 |
| - * @typedef {JSX.IntrinsicElements['ol'] & ReactMarkdownProps & {depth: number, ordered: true}} OrderedListProps |
56 |
| - * @typedef {JSX.IntrinsicElements['table'] & ReactMarkdownProps & {style?: Record<string, unknown>, isHeader: boolean}} TableCellProps |
57 |
| - * @typedef {JSX.IntrinsicElements['tr'] & ReactMarkdownProps & {isHeader: boolean}} TableRowProps |
58 |
| - * @typedef {JSX.IntrinsicElements['ul'] & ReactMarkdownProps & {depth: number, ordered: false}} UnorderedListProps |
| 57 | + * @typedef {ComponentPropsWithoutRef<'code'> & ReactMarkdownProps & {inline?: boolean}} CodeProps |
| 58 | + * @typedef {ComponentPropsWithoutRef<'h1'> & ReactMarkdownProps & {level: number}} HeadingProps |
| 59 | + * @typedef {ComponentPropsWithoutRef<'li'> & ReactMarkdownProps & {checked: boolean|null, index: number, ordered: boolean}} LiProps |
| 60 | + * @typedef {ComponentPropsWithoutRef<'ol'> & ReactMarkdownProps & {depth: number, ordered: true}} OrderedListProps |
| 61 | + * @typedef {ComponentPropsWithoutRef<'table'> & ReactMarkdownProps & {style?: Record<string, unknown>, isHeader: boolean}} TableCellProps |
| 62 | + * @typedef {ComponentPropsWithoutRef<'tr'> & ReactMarkdownProps & {isHeader: boolean}} TableRowProps |
| 63 | + * @typedef {ComponentPropsWithoutRef<'ul'> & ReactMarkdownProps & {depth: number, ordered: false}} UnorderedListProps |
59 | 64 | *
|
60 | 65 | * @typedef {ComponentType<CodeProps>} CodeComponent
|
61 | 66 | * @typedef {ComponentType<HeadingProps>} HeadingComponent
|
|
0 commit comments