templateLiteral
Builds a parser for a deterministic string shape ("order-${number}", "user-${string}-${number}", etc.). DDataParser.templateLiteral() takes an array mixing primitive parts and sub-parsers (string, number, literal, ...) and returns a strongly typed string parser.
Interactive example
Parameters
template: shape to validate (primitive parts or compatible sub-parsers).pattern:RegExpautomatically generated from the template (override rarely needed).checkers:checkerRefineto apply additional rules.
Return value
A DataParserTemplateLiteral that produces a string matching the provided template. parse → DEither.success<string> or DEither.error<DataParserError>.
