Skip to main content

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

TemplateSource

Defined in

src/loader.ts:10

Properties

matter?

readonly optional matter: ContextScope

Additional template globals.

Defined in

src/loader.ts:24


name

readonly name: string

A name or identifier for the template.

Defined in

src/loader.ts:19


source

readonly source: string

The template's source code.

Defined in

src/loader.ts:14


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

src/loader.ts:30


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

Defined in

src/loader.ts:36