-
-
Notifications
You must be signed in to change notification settings - Fork 895
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix to correctly compile intrinsic types
Co-authored-by: Remco Haszing <remcohaszing@gmail.com> Reviewed-by: Remco Haszing <remcohaszing@gmail.com> Reviewed-by: Titus Wormer <tituswormer@gmail.com> Related to GH-622. Closes GH-638.
- Loading branch information
1 parent
02bac83
commit 5af6bc7
Showing
3 changed files
with
36 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import type {ReactNode, ComponentType} from 'react' | ||
import type {Position} from 'unist' | ||
import type {Element} from 'hast' | ||
|
||
/* File for types which are not handled correctly in JSDoc mode */ | ||
|
||
export interface ReactMarkdownProps { | ||
node: Element | ||
children: ReactNode[] | ||
/** | ||
* Passed when `options.rawSourcePos` is given | ||
*/ | ||
sourcePosition?: Position | ||
/** | ||
* Passed when `options.includeElementIndex` is given | ||
*/ | ||
index?: number | ||
/** | ||
* Passed when `options.includeElementIndex` is given | ||
*/ | ||
siblingCount?: number | ||
} | ||
|
||
export type NormalComponents = { | ||
[TagName in keyof JSX.IntrinsicElements]: | ||
| keyof JSX.IntrinsicElements | ||
| ComponentType<JSX.IntrinsicElements[TagName] & ReactMarkdownProps> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters