The indices of the child objects within the parseWikilinks result array.
The ending index of this wikilink in the wikitext (exclusive).
The index of this object within the result array returned by parseWikilinks.
The nesting level of this wikilink. 0
if it is not nested within another wikilink.
A value of 1
or greater indicates that the wikilink is either incorrectly embedded
within another wikilink, or that it serves as part of the thumb text of a file wikilink.
The index of the parent object within the parseWikilinks result array,
or null
if there is no parent.
The raw wikilink title, as directly parsed from the left part of a [[wikilink|...]]
expression.
Whether the wikilink appears inside an HTML tag specified in SkipTags.
The starting index of this wikilink in the wikitext.
The original text of the wikilink parsed from the wikitext. The value of this property is static.
Readonly
titleThe title of the page that the wikilink links to.
This property is read-only. To update it, use setTitle.
Gets the display text of the wikilink. If no display text is set, the title text is returned.
Note that interlanguage links (which appear in the sidebar) are not resolved in terms of how they are displayed there.
The display text as a string.
Checks whether this wikilink has a display text (the part after |
).
A boolean indicating whether the wikilink has a display text.
Sets the display text of the wikilink.
The display text. To unset it, pass an empty string or null
.
The current instance for chaining.
Sets a new title to the instance.
If the new title is a valid MediaWiki title, use toWikilink or toFileWikilink instead.
The new title. This must be a string.
The current instance for chaining.
Creates a new ParsedFileWikilink instance, inheriting the current instance's properties.
The file title to set.
Optional
verbose: booleanWhether to log errors. (Default: false
)
A new ParsedFileWikilink instance on success; otherwise, null
.
Creates a new ParsedWikilink instance, inheriting the current instance's properties.
The non-file title to set.
Optional
verbose: booleanWhether to log errors. (Default: false
)
A new ParsedWikilink instance on success; otherwise, null
.
The instance members of the
ParsedRawWikilink
class. For static members, see ParsedRawWikilinkStatic (defined separately due to TypeScript limitations).