The name of the parameter
Optional
valueType: string | RegExpThe type of the value
Optional
options: { Options for the parameter
Optional
global?: booleanWhether to match globally
Optional
optional?: booleanWhether the parameter is optional
A RegExp matching a parameter
Matching a parameter with a range of possible values
const m2 = RawParameter("data", /(1|2|a|b)/, { global: false });
const t2 = "{{placeholder data=1}}";
const t3 = "{{placeholder data=b}}";
expect(t2.match(m2)?.[2]).toEqual("1");
expect(t3.match(m2)?.[2]).toEqual("b");
Generated using TypeDoc
Matches a parameter in the form name=Value