Class: TemplateSource
Represents a Liquid template's source code and additional meta data.
Constructors
new TemplateSource()
new TemplateSource(
source
,name
,matter
?,upToDate
?,upToDateSync
?):TemplateSource
Parameters
• source: string
The template's source code.
• name: string
A name or identifier for the template.
• matter?: ContextScope
Additional template globals.
• upToDate?
A function that returns true
if the template is up to date, or
false
if it needs to be loaded again.
• upToDateSync?
A function that returns true
if the template is up to date, or
false
if it needs to be loaded again.
Returns
Defined in
Properties
matter?
readonly
optional
matter:ContextScope
Additional template globals.
Defined in
name
readonly
name:string
A name or identifier for the template.
Defined in
source
readonly
source:string
The template's source code.
Defined in
upToDate()?
readonly
optional
upToDate: () =>Promise
<boolean
>
A function that returns true
if the template is up to date, or
false
if it needs to be loaded again.
Returns
Promise
<boolean
>
Defined in
upToDateSync()?
readonly
optional
upToDateSync: () =>boolean
A function that returns true
if the template is up to date, or
false
if it needs to be loaded again.
Returns
boolean