mirror of
https://github.com/Sevichecc/Urara-Blog.git
synced 2025-05-07 22:09:12 +08:00
15 lines
435 B
Text
15 lines
435 B
Text
/**
|
|
* @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]
|