UNPKG

@tripetto/block-dropdown

Version:

Dropdown block for Tripetto.

30 lines (29 loc) 1.05 kB
/** Dependencies */ import { NodeBlock, Slots } from "@tripetto/runner"; import { IDropdownOption } from "./option"; export declare abstract class Dropdown extends NodeBlock<{ readonly options?: IDropdownOption[]; readonly randomize?: boolean; }> { /** Contains the randomized options order. */ private randomized?; /** Contains the score slot. */ readonly scoreSlot: | import("@tripetto/runner").Value<number, Slots.Numeric> | undefined; /** Contains the dropdown slot. */ readonly dropdownSlot: import("@tripetto/runner").Value< string, Slots.String >; /** Contains if the dropdown is required. */ readonly required: boolean; /** Retrieves the dropdown options. */ get options(): IDropdownOption[]; /** Retrieves the reference of the selection option. */ get value(): string; /** Sets the reference of the selected option. */ set value(reference: string); /** Selects an option. */ select(option: IDropdownOption | undefined): string; }