The name of the placeholder.
Optional
options: { Optional
apply_The function to apply to the placeholder. Specify either this or replace_with.
The string to apply the placeholder to.
Optional
context: { The context object to store & retrieve values from.
An object containing the result of the placeholder and any other values to store in the context object.
Optional
categories?: PlaceholderCategory[]The categories of the placeholder.
Optional
constant?: booleanWhether the placeholder's value is constant over the course of a single run.
Optional
description?: stringA brief description of the placeholder.
Optional
example?: stringAn example of the placeholder in use.
Optional
fullA representation of the placeholder to show in detailed explanations.
Optional
hintA representation of the placeholder to show in hints.
Optional
regex?: RegExpThe regex to match the placeholder.
Optional
replace_The string to replace the placeholder with. Specify either this or apply_fn. Can include other placeholders.
Optional
rules?: ((str, context?) => Promise<boolean>)[]The rules that determine whether or not the placeholder is relevant in the current context.
The string to check the rules against.
The context object to store & retrieve values from.
True if the placeholder should be replaced, false otherwise.
Optional
type?: PlaceholderTypeThe type of the placeholder.
A placeholder object.
Generated using TypeDoc
Creates a new placeholder.