import { Token } from '../index'; import { SyntaxToken } from '../syntax'; import { AttributesToken } from '../attributes'; import type { Config } from '../../base'; import type { AttributesParentBase } from '../../mixin/attributesParent'; declare type TableTypes = 'table' | 'tr' | 'td'; export interface TableBaseToken extends AttributesParentBase { } /** * 转义表格语法 * @param syntax 表格语法节点 */ export declare const escapeTable: (syntax: SyntaxToken) => void; /** * table row that contains the newline at the beginning but not at the end * * 表格行,含开头的换行,不含结尾的换行 * @classdesc `{childNodes: [SyntaxToken, AttributesToken, ...Token[]]}` */ export declare abstract class TableBaseToken extends Token { abstract get type(): TableTypes; readonly childNodes: readonly [SyntaxToken, AttributesToken, ...Token[]]; abstract get firstChild(): SyntaxToken; abstract get lastChild(): Token; abstract get children(): [SyntaxToken, AttributesToken, ...Token[]]; abstract get firstElementChild(): SyntaxToken; abstract get lastElementChild(): Token; /** * @param pattern 表格语法正则 * @param syntax 表格语法 * @param type 节点类型 * @param attr 表格属性 */ constructor(pattern: RegExp, syntax: string | undefined, type: TableTypes, attr?: string, config?: Config, accum?: Token[], acceptable?: WikiParserAcceptable); cloneNode(): this; } export {};