14 lines
355 B
TypeScript
14 lines
355 B
TypeScript
/**
|
|
* @typedef {import('hast').Nodes} Nodes
|
|
*/
|
|
/**
|
|
* Get the rank (`1` to `6`) of headings (`h1` to `h6`).
|
|
*
|
|
* @param {Nodes} node
|
|
* Node to check.
|
|
* @returns {number | undefined}
|
|
* Rank of the heading or `undefined` if not a heading.
|
|
*/
|
|
export function headingRank(node: Nodes): number | undefined;
|
|
export type Nodes = import('hast').Nodes;
|