remarkjs / react-markdown

Compare 02bac83 ... +4 ... c3de913

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 1 of 3 files from the diff.
Other files ignored by Codecov

@@ -1,14 +1,15 @@
Loading
1 1
/**
2 -
 * @typedef {JSX.IntrinsicElements} IntrinsicElements
3 2
 * @typedef {import('react').ReactNode} ReactNode
4 3
 * @typedef {import('unist').Position} Position
5 4
 * @typedef {import('hast').Element} Element
5 +
 * @typedef {import('hast').ElementContent} ElementContent
6 6
 * @typedef {import('hast').Root} Root
7 7
 * @typedef {import('hast').Text} Text
8 8
 * @typedef {import('hast').Comment} Comment
9 9
 * @typedef {import('hast').DocType} Doctype
10 10
 * @typedef {import('property-information').Info} Info
11 11
 * @typedef {import('property-information').Schema} Schema
12 +
 * @typedef {import('./complex-types').ReactMarkdownProps} ReactMarkdownProps
12 13
 *
13 14
 * @typedef Raw
14 15
 * @property {'raw'} type
@@ -21,7 +22,7 @@
Loading
21 22
 *
22 23
 * @callback TransformLink
23 24
 * @param {string} href
24 -
 * @param {Array.<Comment|Element|Text>} children
25 +
 * @param {Array.<ElementContent>} children
25 26
 * @param {string?} title
26 27
 * @returns {string}
27 28
 *
@@ -31,24 +32,18 @@
Loading
31 32
 * @param {string?} title
32 33
 * @returns {string}
33 34
 *
35 +
 * @typedef {import("react").HTMLAttributeAnchorTarget} TransformLinkTargetType
36 +
 *
34 37
 * @callback TransformLinkTarget
35 38
 * @param {string} href
36 -
 * @param {Array.<Comment|Element|Text>} children
39 +
 * @param {Array.<ElementContent>} children
37 40
 * @param {string?} title
38 -
 * @returns {string|undefined}
41 +
 * @returns {TransformLinkTargetType|undefined}
39 42
 *
40 -
 * @typedef {keyof IntrinsicElements} ReactMarkdownNames
43 +
 * @typedef {keyof JSX.IntrinsicElements} ReactMarkdownNames
41 44
 *
42 45
 * To do: is `data-sourcepos` typeable?
43 46
 *
44 -
 * @typedef ReactMarkdownProps
45 -
 * @property {Element} node
46 -
 * @property {string} key
47 -
 * @property {ReactNode[]} children
48 -
 * @property {Position?} [sourcePosition] Passed when `options.rawSourcePos` is given
49 -
 * @property {number} [index] Passed when `options.includeElementIndex` is given
50 -
 * @property {number} [siblingCount] Passed when `options.includeElementIndex` is given
51 -
 *
52 47
 * @callback CodeComponent
53 48
 * @param {JSX.IntrinsicElements['code'] & ReactMarkdownProps & {inline?: boolean}} props
54 49
 * @returns {ReactNode}
@@ -92,8 +87,7 @@
Loading
92 87
 * @property {TableRowComponent|ReactMarkdownNames} tr
93 88
 * @property {UnorderedListComponent|ReactMarkdownNames} ul
94 89
 *
95 -
 * @typedef {{[TagName in keyof IntrinsicElements]: TagName | ((props: IntrinsicElements[TagName] & ReactMarkdownProps) => ReactNode)}} NormalComponents
96 -
 * @typedef {Partial<Omit<NormalComponents, keyof SpecialComponents> & SpecialComponents>} Components
90 +
 * @typedef {Partial<Omit<import("./complex-types").NormalComponents, keyof SpecialComponents> & SpecialComponents>} Components
97 91
 *
98 92
 * @typedef Options
99 93
 * @property {boolean} [sourcePos=false]
@@ -102,7 +96,7 @@
Loading
102 96
 * @property {boolean} [includeElementIndex=false]
103 97
 * @property {null|false|TransformLink} [transformLinkUri]
104 98
 * @property {TransformImage} [transformImageUri]
105 -
 * @property {string|TransformLinkTarget} [linkTarget]
99 +
 * @property {TransformLinkTargetType|TransformLinkTarget} [linkTarget]
106 100
 * @property {Components} [components]
107 101
 */
108 102
@@ -145,10 +139,8 @@
Loading
145 139
      ) {
146 140
        children.push(child.value)
147 141
      }
148 -
      // @ts-expect-error `raw` nodes are non-standard
149 142
    } else if (child.type === 'raw' && !context.options.skipHtml) {
150 143
      // Default behavior is to show (encoded) HTML.
151 -
      // @ts-expect-error `raw` nodes are non-standard
152 144
      children.push(child.value)
153 145
    }
154 146
  }
@@ -201,7 +193,7 @@
Loading
201 193
  context.schema = parentSchema
202 194
203 195
  // Nodes created by plugins do not have positional info, in which case we use
204 -
  // an object that matches the positon interface.
196 +
  // an object that matches the position interface.
205 197
  const position = node.position || {
206 198
    start: {line: null, column: null, offset: null},
207 199
    end: {line: null, column: null, offset: null}

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
lib 100.00%
index.js 100.00%
Project Totals (5 files) 100.00%
Loading