TocApi: {
    refresh: () => void;
    setValue: (value: string | null) => void;
    value: string | null;
}

Imperative handle returned by enhanceToc.

Type declaration

  • refresh: () => void

    Rebuild the list from the current headings.

  • setValue: (value: string | null) => void

    Mark the entry for heading value as current (or clear with null).

  • Readonlyvalue: string | null

    Id of the heading currently marked aria-current, or null.