TreeNode Type — astro Architecture
Architecture documentation for the TreeNode type/interface in TreeNode.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD ac917e73_f7c3_ca80_42bb_87a2f0eafc35["TreeNode"] a73f1f20_3c4c_06b9_4480_f1f15d6d68ab["TreeNode.ts"] ac917e73_f7c3_ca80_42bb_87a2f0eafc35 -->|defined in| a73f1f20_3c4c_06b9_4480_f1f15d6d68ab style ac917e73_f7c3_ca80_42bb_87a2f0eafc35 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/integrations/markdoc/components/TreeNode.ts lines 17–39
type TreeNode =
// Markdoc `if` tag often returns an array of nodes in the AST, which gets translated
// here as an array of `TreeNode`s, which we'll render all without a wrapper.
| TreeNode[]
| {
type: 'text';
content: string | HTMLString;
}
| {
type: 'component';
component: AstroInstance['default'];
collectedLinks?: string[];
collectedStyles?: string[];
collectedScripts?: string[];
props: Record<string, any>;
children: TreeNode[];
}
| {
type: 'element';
tag: string;
attributes: Record<string, any>;
children: TreeNode[];
};
Source
Frequently Asked Questions
What is the TreeNode type?
TreeNode is a type/interface in the astro codebase, defined in packages/integrations/markdoc/components/TreeNode.ts.
Where is TreeNode defined?
TreeNode is defined in packages/integrations/markdoc/components/TreeNode.ts at line 17.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free