@alauda/doom
Version:
Doctor Doom making docs.
18 lines (17 loc) • 386 B
TypeScript
import type { Root } from 'mdast';
export interface TocItem {
id: string;
text: string;
depth: number;
index: number;
}
export interface PageMeta {
toc: TocItem[];
title: string;
headingTitle: string;
frontmatter?: Record<string, unknown>;
}
export declare const parseToc: (tree: Root, allDepths?: boolean) => {
title: string;
toc: TocItem[];
};