Optional
appendOptional text to add after the template title.
Optional
brA predicate function to determine whether there should be a line break after each template parameter.
This predicate is called on every parameter if provided. If sortPredicate is also provided, the predicate is evaluated against the reordered array.
A template parameter object.
true
to add a trailing line break, or false
otherwise.
Optional
brA predicate function to determine whether there should be a line break after the title.
Optional
prependOptional text to add before the template title (e.g., subst:
).
If this would end up in a double colon before the template title, it will be automatically sanitized to a single colon.
Optional
rawOptional
sortCallback function to Array.prototype.sort, called on an array-cast Template.params before stringifying the template parameters.
Optional
suppressBy default, stringify()
outputs all numeric keys (e.g., '1='
), unless they were registered
without an explicit key and were internally assigned numeric keys. However, it is best practice
to explicitly name all keys when registering parameters via Template.insertParam, to avoid
unintentionally assigning different numeric keys.
In such cases, you can use this option to suppress specific numeric keys from the output by
providing an array of keys (e.g., { suppressKeys: ['1'] }
). The specified keys will be excluded
from the result.
Note that this option has no effect if a parameter value contains an '='
. To ensure correct rendering,
mwbot-ts
will always include the key for such parameters.
Options for ParsedTemplate.stringify.
This interface differs from RawTemplateOutputConfig in that the argument of brPredicateTitle is an instance of Title instead of a string.