UNPKG

wikiparser-node

Version:

A Node.js parser for MediaWiki markup with AST

33 lines (32 loc) 1.11 kB
import { LinkBaseToken } from './base'; import { NoincludeToken } from '../nowiki/noinclude'; import type { LintError, Config } from '../../base'; import type { Title } from '../../lib/title'; import type { Token, AtomToken } from '../../internal'; /** * target of a redirect * * 重定向目标 * @classdesc `{childNodes: [AtomToken, ?NoincludeToken]}` */ export declare abstract class RedirectTargetToken extends LinkBaseToken { readonly childNodes: readonly [AtomToken] | readonly [AtomToken, NoincludeToken]; abstract get lastChild(): AtomToken | NoincludeToken; abstract get link(): Title; abstract get children(): [AtomToken] | [AtomToken, NoincludeToken]; abstract get lastElementChild(): AtomToken | NoincludeToken; abstract set link(link: string); get type(): 'redirect-target'; /** * link text * * 链接显示文字 * @since v1.10.0 */ get innerText(): string; /** * @param link 链接标题 * @param linkText 链接显示文字 */ constructor(link: string, linkText?: string, config?: Config, accum?: Token[]); }