import { LinkBaseToken } from './base'; import type { LintError } from '../../base'; import type { Title } from '../../lib/title'; import type { Token, AtomToken } from '../../internal'; /** * internal link * * 内链 * @classdesc `{childNodes: [AtomToken, ?Token]}` */ export declare abstract class LinkToken extends LinkBaseToken { readonly childNodes: readonly [AtomToken] | readonly [AtomToken, Token]; abstract get link(): Title; abstract get children(): [AtomToken] | [AtomToken, Token]; abstract set link(link: string); get type(): 'link'; /** link text / 链接显示文字 */ get innerText(): string; set innerText(text: string); /** whether to be a self link / 是否链接到自身 */ get selfLink(): boolean; set selfLink(selfLink: boolean); /** * Set the interlanguage link * * 设置跨语言链接 * @param lang language prefix / 语言前缀 * @param link page title / 页面标题 * @throws `SyntaxError` 仅有片段标识符 */ setLangLink(lang: string, link: string): void; /** * Convert to a self link * * 修改为到自身的链接 * @param fragment URI fragment / 片段标识符 * @throws `RangeError` 空的片段标识符 */ asSelfLink(fragment?: string): void; /** * Automatically generate the link text after the pipe * * 自动生成管道符后的链接文字 * @throws `Error` 带有"#"或"%"时不可用 */ pipeTrick(): void; }