Type Alias: EnvironmentOptions
EnvironmentOptions =
object
Defined in: src/environment.ts:94
Options for the Environment constructor.
Properties
autoEscape?
optionalautoEscape?:boolean
Defined in: src/environment.ts:99
When true, render context variables will be HTML escaped before output.
Default Value
false
globals?
optionalglobals?:Namespace
Defined in: src/environment.ts:109
An optional object who's properties will be added to the render context of every template rendered from this environment.
globals is not copied, so updates to it after environment construction
will be visible to templates.
Default Value
An empty Object.
loader?
optionalloader?:TemplateLoader
Defined in: src/environment.ts:116
A template loader. Used to load templates from a file system or database, for example.
Default Value
An empty MapLoader.
maxAssignScore?
optionalmaxAssignScore?:number
Defined in: src/environment.ts:122
The maximum assign score allowed per template before a resource limit error is thrown.
maxAssignScoreCumulative?
optionalmaxAssignScoreCumulative?:number
Defined in: src/environment.ts:128
The maximum combined assign score allowed for a template and any rendered partial templates before a resource limit error is thrown.
maxContextDepth?
optionalmaxContextDepth?:number
Defined in: src/environment.ts:135
The maximum number of times a render context can be copied or extended before throwing a resource limit error.
Default Value
30
maxRenderScore?
optionalmaxRenderScore?:number
Defined in: src/environment.ts:147
The maximum render score allowed per template before a resource limit error is thrown.
maxRenderScoreCumulative?
optionalmaxRenderScoreCumulative?:number
Defined in: src/environment.ts:153
The maximum combined render score allowed for a template and any rendered partial templates before a resource limit error is thrown.
maxRenderSize?
optionalmaxRenderSize?:number
Defined in: src/environment.ts:141
The maximum number of bytes that can be written to an output buffer before a resource limit error is thrown.
strictFilters?
optionalstrictFilters?:boolean
Defined in: src/environment.ts:161
When true, a NoSuchFilterError will be raised if a template attempts
to use an undefined filter. When false, undefined filters are silently
ignored.
Default Value
true
undefinedType?
optionalundefinedType?:_Undefined
Defined in: src/environment.ts:167
The Undefined type used when a variable or property can not be resolved.
Default Value
Undefined