Interface TwingSynchronousTemplate

interface TwingSynchronousTemplate {
    aliases: TwingSynchronousTemplateAliases;
    ast: TwingTemplateNode;
    blockHandlers: Map<string, TwingSynchronousTemplateBlockHandler>;
    canBeUsedAsATrait: boolean;
    embeddedTemplates: Map<number, TwingSynchronousTemplate>;
    macroHandlers: Map<string, TwingSynchronousTemplateMacroHandler>;
    name: string;
    source: TwingSource;
    displayBlock(executionContext: TwingSynchronousExecutionContext, name: string, useBlocks: boolean): void;
    displayParentBlock(executionContext: TwingSynchronousExecutionContext, name: string): void;
    execute(environment: TwingSynchronousEnvironment, context: Map<string, any>, blocks: TwingSynchronousTemplateBlockMap, outputBuffer: TwingOutputBuffer, options?: {
        nodeExecutor?: TwingSynchronousNodeExecutor;
        sandboxed?: boolean;
        sourceMapRuntime?: TwingSourceMapRuntime;
        strict?: boolean;
        templateLoader?: TwingSynchronousTemplateLoader;
    }): void;
    getBlocks(executionContext: TwingSynchronousExecutionContext): TwingSynchronousTemplateBlockMap;
    getParent(executionContext: TwingSynchronousExecutionContext): null | TwingSynchronousTemplate;
    getTraits(executionContext: TwingSynchronousExecutionContext): TwingSynchronousTemplateBlockMap;
    hasBlock(executionContext: TwingSynchronousExecutionContext, name: string, blocks: TwingSynchronousTemplateBlockMap): boolean;
    hasMacro(name: string): boolean;
    loadTemplate(executionContext: TwingSynchronousExecutionContext, identifier: string | TwingSynchronousTemplate | (null | string | TwingSynchronousTemplate)[]): TwingSynchronousTemplate;
    render(environment: TwingSynchronousEnvironment, context: Map<string, any>, options?: {
        nodeExecutor?: TwingSynchronousNodeExecutor;
        outputBuffer?: TwingOutputBuffer;
        sandboxed?: boolean;
        sourceMapRuntime?: TwingSourceMapRuntime;
        strict?: boolean;
        templateLoader?: TwingSynchronousTemplateLoader;
    }): string;
}

Properties

blockHandlers: Map<string, TwingSynchronousTemplateBlockHandler>
canBeUsedAsATrait: boolean
embeddedTemplates: Map<number, TwingSynchronousTemplate>
macroHandlers: Map<string, TwingSynchronousTemplateMacroHandler>
name: string
source: TwingSource

Methods