Link
import { Link } from "jsr:@ende/markdown";interface
interface LinkA link. Inline links, autolinks, and reference links all become this node; a reference link carries the URL and title of its definition.
Example: Usage
import type { Link } from "@ende/markdown/types";
import { assertEquals } from "@ende/assert";
const node: Link = {
type: "link",
url: "https://ende.sh",
title: null,
children: [{ type: "text", value: "Ende" }]
};
assertEquals(node.url, "https://ende.sh");
Properties
type
type: "link"Node type.
url
url: stringThe destination, percent-encoded where needed.
title
title: string | nullThe title, or null if there is none.
children
children: PhrasingContent[]The link text.