export interface NodeType { el: Element | null; id: string | null; attribute: string; content: string; level: number; children: NodeType[]; prev?: NodeType; } export interface OptionsType { attributes?: ("h1" | "h2" | "h3" | "h4" | "h5")[]; containerClassName?: string; ordered?: boolean; containerSelector?: string; containerElement?: HTMLElement; contentSelector?: string; contentElement?: HTMLElement; returnObject?: boolean; } export default class TableOfContents { content: HTMLElement | null; nodeList: NodeType[] | undefined; nodeObject: NodeType | null; markup: HTMLElement | null; options?: OptionsType; settings: OptionsType; constructor(options?: OptionsType); init: () => void | NodeType | null; private findAllHeaders; private createHierarchy; private generateMarkup; }