TextTemplate class

Defines a text template where the template expression is local aka "inline" and processed through registered language generator.

Constructors

TextTemplate(string)

Initialize a new instance of TextTemplate class.

Properties

$kind
template

Gets or sets the template to evaluate to create the text.

toString

Methods

bind(DialogContext, D)

Bind data to template.

configure(TextTemplateConfiguration)
getConverter(Object)

Constructor Details

TextTemplate(string)

Initialize a new instance of TextTemplate class.

new TextTemplate(template?: string)

Parameters

template

string

The template to evaluate to create text.

Property Details

$kind

static $kind: string

Property Value

string

template

Gets or sets the template to evaluate to create the text.

template: string

Property Value

string

toString

toString: () => string

Property Value

() => string

Method Details

bind(DialogContext, D)

Bind data to template.

function bind(dialogContext: DialogContext, data: D): Promise<string>

Parameters

dialogContext

DialogContext

DialogContext.

data

D

Data to bind to.

Returns

Promise<string>

A promise representing the asynchronous operation.

configure(TextTemplateConfiguration)

function configure(config: TextTemplateConfiguration): this

Parameters

config
TextTemplateConfiguration

The configuration.

Returns

this

A object with the given configuration.

getConverter(Object)

function getConverter(_property: Object): Converter | ConverterFactory

Parameters

_property

Object

The key of the conditional selector configuration.

Returns

Converter | ConverterFactory

The converter for the selector configuration.