/** * @typedef {import('hast').Parent} Parent * @typedef {import('hast').Root} Root * @typedef {Root|Parent['children'][number]} Node */ /** * Rank of a heading: H1 -> 1, H2 -> 2, etc. * * @param {Node} node * @returns {number|null} */ export function headingRank(node: Node): number | null export type Parent = import('hast').Parent export type Root = import('hast').Root export type Node = Root | Parent['children'][number]