TextTemplate class

定義文字範本,其中範本運算式是本機名稱為「內嵌」,並透過已註冊的語言產生器進行處理。

建構函式

TextTemplate(string)

初始化 TextTemplate 類別的新實例。

屬性

$kind
template

取得或設定要評估以建立文字的範本。

toString

建構函式詳細資料

TextTemplate(string)

初始化 TextTemplate 類別的新實例。

new TextTemplate(template?: string)

參數

template

string

要評估為建立文字的範本。

屬性詳細資料

$kind

static $kind: string

屬性值

string

template

取得或設定要評估以建立文字的範本。

template: string

屬性值

string

toString

toString: () => string

屬性值

() => string

方法詳細資料

bind(DialogContext, D)

將數據系結至範本。

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

參數

dialogContext

DialogContext

DialogContext。

data

D

要系結的數據。

傳回

Promise<string>

代表異步操作的承諾。

configure(TextTemplateConfiguration)

function configure(config: TextTemplateConfiguration): this

參數

config
TextTemplateConfiguration

組態。

傳回

this

具有指定組態的物件。

getConverter(Object)

function getConverter(_property: Object): Converter | ConverterFactory

參數

_property

Object

條件式選取器組態的索引鍵。

傳回

Converter | ConverterFactory

選取器組態的轉換器。