@microsoft/fast-element/declarative.js > TemplateParser

TemplateParser class

Converts declarative HTML template markup into the strings and values arrays that ViewTemplate.create() consumes.

This class is intentionally stateless across invocations — all mutable parsing state lives on the call stack or in the TemplateResolutionContext.

The parsing pipeline is fully synchronous — no promises are allocated during template resolution.

Signature:

export declare class TemplateParser

Methods

Method

Modifiers

Description

createTemplate(strings, values)

Create a ViewTemplate from resolved strings and values.

parse(innerHTML, schema)

Parse declarative HTML into strings and values for ViewTemplate creation.