import { AstNode } from './node'; import type { LintError } from '../base'; /** * text node * * 文本节点 */ export declare class AstText extends AstNode { #private; readonly name: undefined; readonly data: string; get type(): 'text'; /** @param text 包含文本 */ constructor(text: string); /** * Replace the text * * 替换字符串 * @param text new text / 替换的字符串 */ replaceData(text: string): void; /** * Split the text node into two parts * * 将文本子节点分裂为两部分 * @param offset position to be splitted at / 分裂位置 * @throws `Error` if the text node has no parent node */ splitText(offset: number): AstText; /** * Escape `=` and `|` * * 转义 `=` 和 `|` * @since v1.1.4 * @throws `Error` if the text node has no parent node */ escape(): void; }