Skip to content

Commit

Permalink
Add improved type for linkTarget as string
Browse files Browse the repository at this point in the history
Reviewed-by: Christian Murphy <christian.murphy.42@gmail.com>
Reviewed-by: Titus Wormer <tituswormer@gmail.com>

Closes GH-639.
  • Loading branch information
casperiv0 authored Aug 26, 2021
1 parent 5af6bc7 commit ec387c2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/ast-to-react.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@
* @param {string?} title
* @returns {string}
*
* @typedef {import("react").HTMLAttributeAnchorTarget} TransformLinkTargetType
*
* @callback TransformLinkTarget
* @param {string} href
* @param {Array.<ElementContent>} children
* @param {string?} title
* @returns {string|undefined}
* @returns {TransformLinkTargetType|undefined}
*
* @typedef {keyof JSX.IntrinsicElements} ReactMarkdownNames
*
Expand Down Expand Up @@ -94,7 +96,7 @@
* @property {boolean} [includeElementIndex=false]
* @property {null|false|TransformLink} [transformLinkUri]
* @property {TransformImage} [transformImageUri]
* @property {string|TransformLinkTarget} [linkTarget]
* @property {TransformLinkTargetType|TransformLinkTarget} [linkTarget]
* @property {Components} [components]
*/

Expand Down

0 comments on commit ec387c2

Please sign in to comment.