UNPKG

wikiparser-node

Version:

A Node.js parser for MediaWiki markup with AST

38 lines (37 loc) 1.84 kB
import { Token } from './index'; import { NoincludeToken } from './nowiki/noinclude'; import { LinkToken } from './link/index'; import { ExtLinkToken } from './extLink'; import type { Config } from '../base'; import type { AstText, ImagemapToken, GalleryImageToken } from '../internal'; import type { Title } from '../lib/title'; /** * link inside the `<imagemap>` * * `<imagemap>`内的链接 * @classdesc `{childNodes: [AstText, LinkToken|ExtLinkToken, NoincludeToken]}` */ export declare abstract class ImagemapLinkToken extends Token { readonly childNodes: readonly [AstText, LinkToken | ExtLinkToken, NoincludeToken]; abstract get firstChild(): AstText; abstract get lastChild(): NoincludeToken; abstract get parentNode(): ImagemapToken | undefined; abstract get previousSibling(): GalleryImageToken | this | NoincludeToken | AstText | undefined; abstract get nextSibling(): this | NoincludeToken | AstText | undefined; abstract get children(): [LinkToken | ExtLinkToken, NoincludeToken]; abstract get firstElementChild(): LinkToken | ExtLinkToken; abstract get lastElementChild(): NoincludeToken; abstract get parentElement(): ImagemapToken | undefined; abstract get previousElementSibling(): GalleryImageToken | this | NoincludeToken | undefined; abstract get nextElementSibling(): this | NoincludeToken | undefined; get type(): 'imagemap-link'; /** internal or external link / 内外链接 */ get link(): string | Title; set link(link: string); /** * @param pre 链接前的文本 * @param linkStuff 内外链接 * @param post 链接后的文本 */ constructor(pre: string, linkStuff: readonly [string, string | undefined, string | undefined] | readonly [string, string | undefined], post: string, config: Config, accum?: Token[]); }