wikiparser-node
Version:
A Node.js parser for MediaWiki markup with AST
32 lines (31 loc) • 1.21 kB
TypeScript
import { Token } from './index';
import { SyntaxToken } from './syntax';
import { RedirectTargetToken } from './link/redirectTarget';
import type { Config, LintError } from '../base';
/**
* redirect
*
* 重定向
* @classdesc `{childNodes: [SyntaxToken, LinkToken]}`
*/
export declare abstract class RedirectToken extends Token {
#private;
readonly childNodes: readonly [SyntaxToken, RedirectTargetToken];
abstract get firstChild(): SyntaxToken;
abstract get lastChild(): RedirectTargetToken;
abstract get previousSibling(): undefined;
abstract get children(): [SyntaxToken, RedirectTargetToken];
abstract get firstElementChild(): SyntaxToken;
abstract get lastElementChild(): RedirectTargetToken;
abstract get previousElementSibling(): undefined;
get type(): 'redirect';
/**
* @param pre leading whitespace
* @param syntax 重定向魔术字
* @param link 重定向目标
* @param text 重定向显示文本(无效)
* @param post trailing whitespace
*/
constructor(pre: string, syntax: string | undefined, link: string, text: string | undefined, post: string, config: Config, accum?: Token[]);
cloneNode(): this;
}