The return type of the template tag functions, html and
svg.
A TemplateResult object holds all the information about a template
expression required to render it: the template strings, expression values,
and type of template (html or svg).
TemplateResult objects do not create any DOM on their own. To create or
update DOM you need to render the TemplateResult. See
Rendering for more information.
In Lit 4, this type will be an alias of
MaybeCompiledTemplateResult, so that code will get type errors if it assumes
that Lit templates are not compiled. When deliberately working with only
one, use either CompiledTemplateResult or
UncompiledTemplateResult explicitly.
The return type of the template tag functions,
html
andsvg
.A
TemplateResult
object holds all the information about a template expression required to render it: the template strings, expression values, and type of template (html or svg).TemplateResult
objects do not create any DOM on their own. To create or update DOM you need to render theTemplateResult
. See Rendering for more information.In Lit 4, this type will be an alias of MaybeCompiledTemplateResult, so that code will get type errors if it assumes that Lit templates are not compiled. When deliberately working with only one, use either
CompiledTemplateResult
orUncompiledTemplateResult
explicitly.