flatmarkdown-ast
v0.2.0
Published
TypeScript type definitions for the FlatMarkdown AST.
Maintainers
Readme
flatmarkdown-ast
TypeScript type definitions for the FlatMarkdown AST.
Installation
npm install flatmarkdown-astUsage
import type { AstNode, DocumentNode, HeadingNode } from 'flatmarkdown-ast';
const doc: DocumentNode = {
type: 'document',
children: [
{ type: 'heading', level: 1, setext: false, children: [{ type: 'text', value: 'Hello' }] },
],
};Exported Types
All 46 AST node interfaces and the AstNode union type:
Block nodes: DocumentNode, ParagraphNode, HeadingNode, CodeBlockNode, BlockQuoteNode, MultilineBlockQuoteNode, ListNode, ItemNode, TaskItemNode, TableNode, TableRowNode, TableCellNode, ThematicBreakNode, HtmlBlockNode, FootnoteDefinitionNode, DescriptionListNode, DescriptionItemNode, DescriptionTermNode, DescriptionDetailsNode, AlertNode, FrontMatterNode, HeexBlockNode, SubtextNode
Inline nodes: TextNode, SoftbreakNode, LinebreakNode, EmphNode, StrongNode, StrikethroughNode, UnderlineNode, HighlightNode, SuperscriptNode, SubscriptNode, SpoileredTextNode, CodeNode, LinkNode, ImageNode, FootnoteReferenceNode, ShortcodeNode, MathNode, HtmlInlineNode, HeexInlineNode, RawNode, EscapedNode, EscapedTagNode, WikilinkNode
License
MIT
