ChoiceSet class
ChoiceSet コレクションを定義します。
- Extends
-
Array<Choice>
コンストラクター
Choice |
ChoiceSet クラスの新しいインスタンスを初期化します。 |
プロパティ
Array |
継承されたプロパティ
length | 配列の長さを取得または設定します。 これは、配列で定義されている最も高い要素より 1 つ上の数値です。 |
メソッド
bind(Dialog |
データをテンプレートにバインドします。 |
継承されたメソッド
コンストラクターの詳細
ChoiceSet(any)
プロパティの詳細
Array
static Array: ArrayConstructor
プロパティ値
ArrayConstructor
継承されたプロパティの詳細
length
配列の長さを取得または設定します。 これは、配列で定義されている最も高い要素より 1 つ上の数値です。
length: number
プロパティ値
number
array.length から継承
メソッドの詳細
bind(DialogContext, DialogStateManager)
データをテンプレートにバインドします。
function bind(dialogContext: DialogContext, data?: DialogStateManager): Promise<ChoiceSet>
パラメーター
- dialogContext
-
DialogContext
DialogContext
- data
-
DialogStateManager
バインドするデータ。
戻り値
Promise<ChoiceSet>
データバインドされた ChoiceSet。
継承済みメソッドの詳細
concat(ConcatArray<Choice>[])
2 つ以上の配列を結合します。
function concat(items: ConcatArray<Choice>[]): Choice[]
パラメーター
- items
-
ConcatArray<Choice>[]
配列 1 の末尾に追加する追加項目。
戻り値
Choice[]
array.concat から継承
concat(T | ConcatArray<T>[])
2 つ以上の配列を結合します。
function concat(items: T | ConcatArray<T>[]): Choice[]
パラメーター
- items
-
T | ConcatArray<T>[]
配列 1 の末尾に追加する追加項目。
戻り値
Choice[]
array.concat から継承
copyWithin(number, number, number)
開始と終了で識別される配列のセクションを、ターゲット位置から始まる同じ配列にコピーした後、このオブジェクトを返します。
function copyWithin(target: number, start: number, end?: number): this
パラメーター
- target
-
number
ターゲットが負の値の場合は、length + target として扱われます。length は配列の長さです。
- start
-
number
開始が負の値の場合、長さ + 開始として扱われます。 end が負の場合は、length + end として扱われます。
- end
-
number
指定しない場合、このオブジェクトの長さが既定値として使用されます。
戻り値
this
array.copyWithin から継承
entries()
配列内のすべてのエントリのキーと値のペアの反復処理可能な値を返します。
function entries(): IterableIterator<[number, Choice]>
戻り値
IterableIterator<[number, Choice]>
Array.entries から継承された
every((value: Choice, index: number, array: Choice[]) => unknown, any)
配列のすべてのメンバーが指定したテストを満たすかどうかを判断します。
function every(callbackfn: (value: Choice, index: number, array: Choice[]) => unknown, thisArg?: any): boolean
パラメーター
- callbackfn
-
(value: Choice, index: number, array: Choice[]) => unknown
最大 3 つの引数を受け取る関数。 すべてのメソッドは、callbackfn が false を返すまで、または配列の末尾まで、配列 1 内の各要素に対して callbackfn 関数を呼び出します。
- thisArg
-
any
callbackfn 関数でこのキーワードが参照できるオブジェクト。 thisArg を省略すると、この値として undefined が使用されます。
戻り値
boolean
配列から継承.every
fill(Choice, number, number)
start と end で識別されるセクションに値を入力した後、このオブジェクトを返します。
function fill(value: Choice, start?: number, end?: number): this
パラメーター
- value
-
Choice
配列セクションを埋める値
- start
-
number
配列の入力を開始するインデックス。 start が負の値の場合は、length + start として扱われます。length は配列の長さです。
- end
-
number
配列の入力を停止するインデックス。 end が負の場合は、length + end として扱われます。
戻り値
this
array.fill から継承
filter((value: Choice, index: number, array: Choice[]) => unknown, any)
コールバック関数で指定された条件を満たす配列の要素を返します。
function filter(callbackfn: (value: Choice, index: number, array: Choice[]) => unknown, thisArg?: any): Choice[]
パラメーター
- callbackfn
-
(value: Choice, index: number, array: Choice[]) => unknown
最大 3 つの引数を受け取る関数。 このフィルター メソッドは、配列内の各要素に対して callbackfn 関数を 1 回呼び出します。
- thisArg
-
any
callbackfn 関数でこのキーワードが参照できるオブジェクト。 thisArg を省略すると、この値として undefined が使用されます。
戻り値
Choice[]
array.filter から継承
filter<S>((value: Choice, index: number, array: Choice[]) => boolean, any)
コールバック関数で指定された条件を満たす配列の要素を返します。
function filter<S>(callbackfn: (value: Choice, index: number, array: Choice[]) => boolean, thisArg?: any): S[]
パラメーター
- callbackfn
-
(value: Choice, index: number, array: Choice[]) => boolean
最大 3 つの引数を受け取る関数。 このフィルター メソッドは、配列内の各要素に対して callbackfn 関数を 1 回呼び出します。
- thisArg
-
any
callbackfn 関数でこのキーワードが参照できるオブジェクト。 thisArg を省略すると、この値として undefined が使用されます。
戻り値
S[]
array.filter から継承
find((value: Choice, index: number, obj: Choice[]) => unknown, any)
function find(predicate: (value: Choice, index: number, obj: Choice[]) => unknown, thisArg?: any): Choice | undefined
パラメーター
- predicate
-
(value: Choice, index: number, obj: Choice[]) => unknown
- thisArg
-
any
戻り値
Choice | undefined
array.find から継承
find<S>((this: void, value: Choice, index: number, obj: Choice[]) => boolean, any)
述語が true である配列の最初の要素の値を返します。それ以外の場合は未定義です。
function find<S>(predicate: (this: void, value: Choice, index: number, obj: Choice[]) => boolean, thisArg?: any): S | undefined
パラメーター
- predicate
-
(this: void, value: Choice, index: number, obj: Choice[]) => boolean
述語が true を返す場所が見つかるまで、配列の各要素の述語を昇順で 1 回検索します。 このような要素が見つかった場合は、すぐにその要素値が返されます。 それ以外の場合、find は未定義を返します。
- thisArg
-
any
指定した場合は、述語の呼び出しごとにこの値として使用されます。 指定されていない場合は、代わりに undefined が使用されます。
戻り値
S | undefined
array.find から継承
findIndex((value: Choice, index: number, obj: Choice[]) => unknown, any)
述語が true の配列内の最初の要素のインデックスを返し、それ以外の場合は -1 返します。
function findIndex(predicate: (value: Choice, index: number, obj: Choice[]) => unknown, thisArg?: any): number
パラメーター
- predicate
-
(value: Choice, index: number, obj: Choice[]) => unknown
述語が true を返す場所が見つかるまで、配列の各要素の述語を昇順で 1 回検索します。 このような要素が見つかった場合、findIndex はすぐにその要素インデックスを返します。 それ以外の場合、findIndex は -1 を返します。
- thisArg
-
any
指定した場合は、述語の呼び出しごとにこの値として使用されます。 指定されていない場合は、代わりに undefined が使用されます。
戻り値
number
array.findIndex から継承
forEach((value: Choice, index: number, array: Choice[]) => void, any)
配列内の各要素に対して指定されたアクションを実行します。
function forEach(callbackfn: (value: Choice, index: number, array: Choice[]) => void, thisArg?: any)
パラメーター
- callbackfn
-
(value: Choice, index: number, array: Choice[]) => void
最大 3 つの引数を受け取る関数。 forEach は、配列内の各要素に対して callbackfn 関数を 1 回呼び出します。
- thisArg
-
any
callbackfn 関数でこのキーワードが参照できるオブジェクト。 thisArg を省略すると、この値として undefined が使用されます。
array.forEach から継承
includes(Choice, number)
配列に特定の要素が含まれているかどうかを判断し、必要に応じて true または false を返します。
function includes(searchElement: Choice, fromIndex?: number): boolean
パラメーター
- searchElement
-
Choice
検索する要素。
- fromIndex
-
number
searchElement の検索を開始するこの配列内の位置。
戻り値
boolean
配列から継承された します。includes
indexOf(Choice, number)
配列内の値の最初の出現位置のインデックスを返します。
function indexOf(searchElement: Choice, fromIndex?: number): number
パラメーター
- searchElement
-
Choice
配列内で検索する値。
- fromIndex
-
number
検索を開始する配列インデックス。 fromIndex を省略すると、検索はインデックス 0 から始まります。
戻り値
number
array.indexOf から継承
join(string)
指定した区切り文字列で区切られた配列のすべての要素を追加します。
function join(separator?: string): string
パラメーター
- separator
-
string
配列の 1 つの要素を、結果の String 内の次の要素から分離するために使用される文字列。 省略すると、配列要素はコンマで区切られます。
戻り値
string
array.join から継承
keys()
配列内のキーの反復処理可能な値を返します。
function keys(): IterableIterator<number>
戻り値
IterableIterator<number>
Array.keys から継承された
lastIndexOf(Choice, number)
配列内の指定した値の最後の出現位置のインデックスを返します。
function lastIndexOf(searchElement: Choice, fromIndex?: number): number
パラメーター
- searchElement
-
Choice
配列内で検索する値。
- fromIndex
-
number
検索を開始する配列インデックス。 fromIndex を省略すると、配列内の最後のインデックスから検索が開始されます。
戻り値
number
array.lastIndexOf から継承
map<U>((value: Choice, index: number, array: Choice[]) => U, any)
配列の各要素に対して定義済みのコールバック関数を呼び出し、結果を含む配列を返します。
function map<U>(callbackfn: (value: Choice, index: number, array: Choice[]) => U, thisArg?: any): U[]
パラメーター
- callbackfn
-
(value: Choice, index: number, array: Choice[]) => U
最大 3 つの引数を受け取る関数。 map メソッドは、配列内の各要素に対して callbackfn 関数を 1 回呼び出します。
- thisArg
-
any
callbackfn 関数でこのキーワードが参照できるオブジェクト。 thisArg を省略すると、この値として undefined が使用されます。
戻り値
U[]
array.map から継承
pop()
配列から最後の要素を削除して返します。
function pop(): Choice | undefined
戻り値
Choice | undefined
array.pop から継承
push(Choice[])
配列に新しい要素を追加し、配列の新しい長さを返します。
function push(items: Choice[]): number
パラメーター
- items
-
Choice[]
配列の新しい要素。
戻り値
number
Array.push から継承された
reduce((previousValue: Choice, currentValue: Choice, currentIndex: number, array: Choice[]) => Choice)
配列内のすべての要素に対して、指定されたコールバック関数を呼び出します。 コールバック関数の戻り値は累積された結果であり、コールバック関数の次の呼び出しで引数として提供されます。
function reduce(callbackfn: (previousValue: Choice, currentValue: Choice, currentIndex: number, array: Choice[]) => Choice): Choice
パラメーター
- callbackfn
-
(previousValue: Choice, currentValue: Choice, currentIndex: number, array: Choice[]) => Choice
最大 4 つの引数を受け取る関数。 reduce メソッドは、配列内の各要素に対して callbackfn 関数を 1 回呼び出します。
戻り値
Choice
array.reduce から継承
reduce((previousValue: Choice, currentValue: Choice, currentIndex: number, array: Choice[]) => Choice, Choice)
function reduce(callbackfn: (previousValue: Choice, currentValue: Choice, currentIndex: number, array: Choice[]) => Choice, initialValue: Choice): Choice
パラメーター
- callbackfn
-
(previousValue: Choice, currentValue: Choice, currentIndex: number, array: Choice[]) => Choice
- initialValue
-
Choice
戻り値
Choice
array.reduce から継承
reduce<U>((previousValue: U, currentValue: Choice, currentIndex: number, array: Choice[]) => U, U)
配列内のすべての要素に対して、指定されたコールバック関数を呼び出します。 コールバック関数の戻り値は累積された結果であり、コールバック関数の次の呼び出しで引数として提供されます。
function reduce<U>(callbackfn: (previousValue: U, currentValue: Choice, currentIndex: number, array: Choice[]) => U, initialValue: U): U
パラメーター
- callbackfn
-
(previousValue: U, currentValue: Choice, currentIndex: number, array: Choice[]) => U
最大 4 つの引数を受け取る関数。 reduce メソッドは、配列内の各要素に対して callbackfn 関数を 1 回呼び出します。
- initialValue
-
U
initialValue が指定されている場合は、累積を開始するための初期値として使用されます。 callbackfn 関数の最初の呼び出しでは、この値が配列値ではなく引数として提供されます。
戻り値
U
array.reduce から継承
reduceRight((previousValue: Choice, currentValue: Choice, currentIndex: number, array: Choice[]) => Choice)
配列内のすべての要素に対して、指定されたコールバック関数を降順で呼び出します。 コールバック関数の戻り値は累積された結果であり、コールバック関数の次の呼び出しで引数として提供されます。
function reduceRight(callbackfn: (previousValue: Choice, currentValue: Choice, currentIndex: number, array: Choice[]) => Choice): Choice
パラメーター
- callbackfn
-
(previousValue: Choice, currentValue: Choice, currentIndex: number, array: Choice[]) => Choice
最大 4 つの引数を受け取る関数。 reduceRight メソッドは、配列内の各要素に対して callbackfn 関数を 1 回呼び出します。
戻り値
Choice
array.reduceRight から継承
reduceRight((previousValue: Choice, currentValue: Choice, currentIndex: number, array: Choice[]) => Choice, Choice)
function reduceRight(callbackfn: (previousValue: Choice, currentValue: Choice, currentIndex: number, array: Choice[]) => Choice, initialValue: Choice): Choice
パラメーター
- callbackfn
-
(previousValue: Choice, currentValue: Choice, currentIndex: number, array: Choice[]) => Choice
- initialValue
-
Choice
戻り値
Choice
array.reduceRight から継承
reduceRight<U>((previousValue: U, currentValue: Choice, currentIndex: number, array: Choice[]) => U, U)
配列内のすべての要素に対して、指定されたコールバック関数を降順で呼び出します。 コールバック関数の戻り値は累積された結果であり、コールバック関数の次の呼び出しで引数として提供されます。
function reduceRight<U>(callbackfn: (previousValue: U, currentValue: Choice, currentIndex: number, array: Choice[]) => U, initialValue: U): U
パラメーター
- callbackfn
-
(previousValue: U, currentValue: Choice, currentIndex: number, array: Choice[]) => U
最大 4 つの引数を受け取る関数。 reduceRight メソッドは、配列内の各要素に対して callbackfn 関数を 1 回呼び出します。
- initialValue
-
U
initialValue が指定されている場合は、累積を開始するための初期値として使用されます。 callbackfn 関数の最初の呼び出しでは、この値が配列値ではなく引数として提供されます。
戻り値
U
array.reduceRight から継承
reverse()
配列内の要素を反転します。
function reverse(): Choice[]
戻り値
Choice[]
Array.reverse から継承
shift()
配列から最初の要素を削除し、それを返します。
function shift(): Choice | undefined
戻り値
Choice | undefined
Array.shift から継承された
slice(number, number)
配列のセクションを返します。
function slice(start?: number, end?: number): Choice[]
パラメーター
- start
-
number
配列の指定した部分の先頭。
- end
-
number
配列の指定した部分の末尾。
戻り値
Choice[]
array.slice から継承
some((value: Choice, index: number, array: Choice[]) => unknown, any)
指定したコールバック関数が配列の任意の要素に対して true を返すかどうかを判断します。
function some(callbackfn: (value: Choice, index: number, array: Choice[]) => unknown, thisArg?: any): boolean
パラメーター
- callbackfn
-
(value: Choice, index: number, array: Choice[]) => unknown
最大 3 つの引数を受け取る関数。 一部のメソッドは、callbackfn が true を返すか、配列の末尾まで、配列 1 内の各要素に対して callbackfn 関数を呼び出します。
- thisArg
-
any
callbackfn 関数でこのキーワードが参照できるオブジェクト。 thisArg を省略すると、この値として undefined が使用されます。
戻り値
boolean
配列から継承された します。some
sort((a: Choice, b: Choice) => number)
配列を並べ替えます。
function sort(compareFn?: (a: Choice, b: Choice) => number): this
パラメーター
- compareFn
-
(a: Choice, b: Choice) => number
要素の順序を決定するために使用される関数の名前。 省略すると、要素は昇順で ASCII 文字順に並べ替えられます。
戻り値
this
array.sort から継承された
splice(number, number)
配列から要素を削除し、必要に応じて新しい要素をその場所に挿入し、削除された要素を返します。
function splice(start: number, deleteCount?: number): Choice[]
パラメーター
- start
-
number
要素の削除を開始する配列内の 0 から始まる位置。
- deleteCount
-
number
削除する要素の数。
戻り値
Choice[]
Array.splice から継承された
splice(number, number, Choice[])
配列から要素を削除し、必要に応じて新しい要素をその場所に挿入し、削除された要素を返します。
function splice(start: number, deleteCount: number, items: Choice[]): Choice[]
パラメーター
- start
-
number
要素の削除を開始する配列内の 0 から始まる位置。
- deleteCount
-
number
削除する要素の数。
- items
-
Choice[]
削除された要素の代わりに配列に挿入する要素。
戻り値
Choice[]
Array.splice から継承された
toLocaleString()
配列の文字列形式を返します。 要素は、toLocalString メソッドを使用して文字列に変換されます。
function toLocaleString(): string
戻り値
string
array.toLocaleString から継承
toString()
配列の文字列形式を返します。
function toString(): string
戻り値
string
array.toString から継承
unshift(Choice[])
配列の先頭に新しい要素を挿入します。
function unshift(items: Choice[]): number
パラメーター
- items
-
Choice[]
配列の先頭に挿入する要素。
戻り値
number
array.unshift から継承
values()
配列内の値の反復処理可能な値を返します。
function values(): IterableIterator<Choice>
戻り値
IterableIterator<Choice>
Array.values から継承