Skip to content

Commit f68de5c

Browse files
committed
Refactor code-style
1 parent 43f91c7 commit f68de5c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

index.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
/**
2-
* @typedef {import('hast').Element & {tagName: 'h1'|'h2'|'h3'|'h4'|'h5'|'h6'|'hgroup'}} Heading
3-
* @typedef {import('hast-util-is-element').AssertPredicate<Heading>} AssertHeading
2+
* @typedef {import('hast').Element} Element
43
*/
54

65
import {convertElement} from 'hast-util-is-element'
76

87
/**
98
* Check if a node is a heading element (includes `hgroup`!).
10-
* @type {AssertHeading}
9+
*
10+
* @type {import('hast-util-is-element').AssertPredicate<Element & {tagName: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'hgroup'}>}
11+
* @param node
12+
* Node to check.
13+
* @returns
14+
* Whether node is a heading (`h1` through `h6`, and `hgroup`).
1115
*/
1216
// @ts-expect-error Sure, the assertion matches.
1317
export const heading = convertElement([

0 commit comments

Comments
 (0)