@opentui/core
Version:
OpenTUI is a TypeScript library for building terminal user interfaces (TUIs)
18 lines (17 loc) • 512 B
TypeScript
import { StyledText } from "./styled-text";
import { SyntaxStyle } from "../syntax-style";
export interface HASTText {
type: "text";
value: string;
}
export interface HASTElement {
type: "element";
tagName: string;
properties?: {
className?: string;
};
children: HASTNode[];
}
export type HASTNode = HASTText | HASTElement;
export type { StyleDefinition } from "../syntax-style";
export declare function hastToStyledText(hast: HASTNode, syntaxStyle: SyntaxStyle): StyledText;