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.
Parameters of the instance. These are not automatically trimmed of leading and trailing whitespace.
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 file that the wikilink transcludes.
This property is read-only. To update it, use setTitle.
Adds a parameter (to the end of the params array).
The new parameter.
Deletes a parameter.
The parameter index to delete.
Whether to shift the remaining parameters to the left after deletion. (Default: true
)
true
if the parameter was deleted, otherwise false
.
Gets a parameter at the given index.
The index of the parameter to retrieve.
The parameter value, or null
if no value is found at the specified index.
Checks if a parameter at the specified index exists, optionally matching its value.
The parameter index to match.
Optional
value: string | RegExpThe optional value matcher.
true
if a matching parameter exists; otherwise, false
.
Checks if a parameter exists based on a custom predicate function.
A function that tests each parameter.
true
if a matching parameter exists; otherwise, false
.
Sets a parameter at the given index.
The new parameter.
The index of the parameter to update.
Options to set the new parameter.
Optional
ifexist?: booleanWhether to set the parameter only if a parameter is already set at the specified index.
Optional
overwrite?: booleanWhether to overwrite existing parameters. If false
, the new parameter is not registered
if there is an existing parameter at the specified index. (Default: true
)
A boolean indicating whether the new parameter has been set.
Sets a new file title to the instance.
A non-file title is not allowed as the title
argument. For 'File:...'
titles
(without a leading colon), use toWikilink instead.
The new file title to set.
Optional
verbose: booleanWhether to log errors. (Default: false
)
A boolean indicating whether the new title was set.
Stringifies the instance.
Optional
options: ParsedFileWikilinkOutputConfigOptions to format the output.
The file wikilink as a string.
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
ParsedFileWikilink
class. For static members, see ParsedFileWikilinkStatic (defined separately due to TypeScript limitations).