import Parser from '../index'; import { AstElement } from '../lib/element'; import { AstText } from '../lib/text'; import type { TokenTypes, LintError } from '../base'; import type { Title, TitleOptions } from '../lib/title'; import type { AstNodes } from '../internal'; declare type ExtendedLintError = LintError[] & { output?: string; }; /** * base class for all tokens * * 所有节点的基类 * @classdesc `{childNodes: (AstText|Token)[]}` */ export declare class Token extends AstElement { #private; get type(): TokenTypes; set type(value: TokenTypes); /** * page name * * 页面名称 * @since v1.29.0 */ get pageName(): string | undefined; set pageName(value: string | undefined); /** @class */ constructor(wikitext?: string, config?: Parser.Config, accum?: Token[], acceptable?: WikiParserAcceptable); /** * @override * @param child node to be inserted / 待插入的子节点 * @param i position to be inserted at / 插入位置 */ insertAt(child: string, i?: number): AstText; insertAt(child: T, i?: number): T; /** * Normalize page title * * 规范化页面标题 * @param title title (with or without the namespace prefix) / 标题(含或不含命名空间前缀) * @param defaultNs default namespace number / 命名空间 */ normalizeTitle(title: string, defaultNs?: number, opt?: TitleOptions): Title; } export {};