Tag function for tagged templates.
Type to represent a tag function for tagged templates, which takes a TemplateStringArray and any number of expressions, and returns a value of type Output (string by default).
TemplateStringArray
Output
string
const intParser: Tagger<number> = strings => parseInt(strings.join(""), 10);intParser`100`; // 100 Copy
const intParser: Tagger<number> = strings => parseInt(strings.join(""), 10);intParser`100`; // 100
Type of the output value.
Type of the expressions.
Tag function for tagged templates.
Remarks
Type to represent a tag function for tagged templates, which takes a
TemplateStringArray
and any number of expressions, and returns a value of typeOutput
(string
by default).Example
See