Root

import { Root } from "jsr:@ende/markdown";

interface

interface Root

The root of a document.

Example: Usage

import type { Root } from "@ende/markdown/types";
import { assertEquals } from "@ende/assert";

const root: Root = { type: "root", children: [{ type: "thematicBreak" }] };
assertEquals(root.children.length, 1);

Properties

type

type: "root"

Node type.

children

children: (BlockContent | DefinitionContent)[]

The top-level blocks.

Source