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?
readonlyoptionalmatter:ContextScope
Additional template globals.
Defined in
name
readonlyname:string
A name or identifier for the template.
Defined in
source
readonlysource:string
The template's source code.
Defined in
upToDate()?
readonlyoptionalupToDate: () =>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()?
readonlyoptionalupToDateSync: () =>boolean
A function that returns true if the template is up to date, or
false if it needs to be loaded again.
Returns
boolean