syntax-tree / hast-util-is-element
Showing 1 of 2 files from the diff.
Other files ignored by Codecov
index.test-d.ts has changed.

@@ -7,6 +7,11 @@
Loading
7 7
 * @typedef {null|undefined|TagName|TestFunctionAnything|Array.<TagName|TestFunctionAnything>} Test
8 8
 */
9 9
10 +
/**
11 +
 * @template {Element} T
12 +
 * @typedef {null|undefined|T['tagName']|TestFunctionPredicate<T>|Array.<T['tagName']|TestFunctionPredicate<T>>} PredicateTest
13 +
 */
14 +
10 15
/**
11 16
 * Check if an element passes a test
12 17
 *
@@ -22,7 +27,7 @@
Loading
22 27
 *
23 28
 * @template {Element} X
24 29
 * @callback TestFunctionPredicate
25 -
 * @param {X} element
30 +
 * @param {Element} element
26 31
 * @param {number|null|undefined} [index]
27 32
 * @param {Parent|null|undefined} [parent]
28 33
 * @returns {element is X}
@@ -56,8 +61,9 @@
Loading
56 61
   * When a `parent` node is known the `index` of node should also be given.
57 62
   *
58 63
   * @type {(
59 -
   *   (<T extends Element>(node: unknown, test: T['tagName']|TestFunctionPredicate<T>|Array.<T['tagName']|TestFunctionPredicate<T>>, index?: number, parent?: Parent, context?: unknown) => node is T) &
60 -
   *   ((node?: unknown, test?: Test, index?: number, parent?: Parent, context?: unknown) => boolean)
64 +
   *   (() => false) &
65 +
   *   (<T extends Element = Element>(node: unknown, test?: PredicateTest<T>, index?: number, parent?: Parent, context?: unknown) => node is T) &
66 +
   *   ((node: unknown, test: Test, index?: number, parent?: Parent, context?: unknown) => boolean)
61 67
   * )}
62 68
   */
63 69
  (
Files Coverage
index.js 100.00%
Project Totals (1 files) 100.00%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading