All shared types are exported from @tanstack/markdown.
string | MarkdownDocument. Accepted by the complete-document renderers.
The root object with type: 'root', children: BlockNode[], optional raw frontmatter, and optional collected headings.
Union of HeadingNode, ParagraphNode, CodeBlockNode, ListNode, BlockquoteNode, TableNode, FootnotesNode, ThematicBreakNode, HtmlBlockNode, CalloutNode, and ComponentNode.
Union of TextNode, CodeSpanNode, StrongNode, EmphasisNode, StrikeNode, FootnoteReferenceNode, LinkNode, ImageNode, BreakNode, and HtmlInlineNode.
Contains depth from 1 through 6, optional id and framework, and inline children.
Contains inline children.
Contains raw value plus optional lang, meta, title, file, framework, and highlightLines metadata.
Contains ordered, optional start, optional loose, and items: ListItemNode[]. A true loose value preserves paragraph wrappers in every item.
Contains block children and optional task-list checked state.
Contains nested block children.
Contains per-column align, a header, and body rows made from TableCellNode values.
Contains inline children.
Generated document block containing items: FootnoteItemNode[].
Contains a collision-safe id, display number, optional referenceCount, and block children.
Marker node with type: 'thematicBreak'.
Contains raw HTML value. It is created only when HTML parsing is enabled.
Contains a callout kind, display title, and block children. It is produced by the callouts extension.
Contains source name, parsed attributes, block children, and optional rendered tagName and string properties. Docs transforms use it for tabs and framework panels.
Contains plain text value.
Contains inline code value.
Contains inline children rendered as strong text.
Contains inline children rendered as emphasized text.
Contains inline children rendered as deleted text.
Contains normalized footnote id, display number, and optional referenceIndex for repeated references.
Contains sanitized href, optional title, and inline children.
Contains sanitized src, text alt, and optional title.
Marker node with type: 'break'.
Contains raw inline HTML value. It is created only when HTML parsing is enabled.
Configures allowHtml, frontmatter, headingIds, and extensions. It also exposes references, footnotes, footnoteOrder, and footnoteCounts state used by nested parser contexts.
Extends ParseOptions with highlighter, codeLineNumbers, and headingAnchors.
Synchronous callback (code, lang?, options?) => string. The returned string is trusted HTML for the contents of <code>.
Contains optional highlightLines and lineNumbers passed to a CodeHighlighter.
Configures anchor content, className, ariaHidden, and tabIndex.
Named hook object with optional parseBlock, transformDocument, transformInline, and renderHtml functions.
Provides source lines, current index, active options, nested parseInline and parseBlocks helpers, and consume.
Provides active parse options to inline transforms.
Provides active parse options to document transforms.
Provides active render options and recursive renderBlock and renderInline functions.
Collected heading data with id, text, numeric level, and optional framework.
Normalized reference data with href and optional title.
Footnote source data with original label, Markdown content, and optional generated id.