UNPKG

@webuildbots/webuildbots-sdk

Version:
26 lines (25 loc) 959 B
import { ChoiceTypes } from '../../const/block-enums'; import { TextOverflow } from '../../const/text-overflow-enums'; import { DeepPartial } from '../../helpers/helpers-types'; import Block from '../../interfaces/block'; import ChoiceBuilder from '../choice/choice-builder'; import ItemBuilder from '../item-builder'; import TextBB from './text-bb'; /** * @depreciated - Use {@link BasicBB} instead */ export default class SelectBB extends TextBB { static readonly QREPLY_LIMIT = 13; itemBuilder: ItemBuilder; constructor(choiceType?: ChoiceTypes, overflow?: TextOverflow); pushChoice<T extends ChoiceBuilder>(cb: T): this; unshiftChoice<T extends ChoiceBuilder>(cb: T): this; hasChoice(cb: ChoiceBuilder): boolean; setChoices<T extends ChoiceBuilder[]>(choices: T): this; private updateChoiceType; /** * This function will use to build block object * @returns Block */ build(): DeepPartial<Block>; }