export type StringNode = string | number; export interface TagNodeObject { readonly tag: TagValue; attrs?: Record; content?: TagNodeTree; start?: TagPosition; end?: TagPosition; toJSON?: () => TagNodeObject; } export type NodeContent = TagNodeObject | StringNode | null; export type PartialNodeContent = Partial> | StringNode | null; export type TagNodeTree = NodeContent | NodeContent[] | null; export type TagPosition = { from: number; to: number; };