UNPKG

@tripetto/block-multiple-choice

Version:

Multiple choice block for Tripetto.

34 lines (33 loc) 1.41 kB
import { NodeBlock, Slots, Value } from "@tripetto/runner"; import { IChoice, IMultipleChoice } from "./interface"; import "./conditions/choice"; export declare abstract class MultipleChoice extends NodeBlock<IMultipleChoice> { /** Contains the randomized choices order. */ private randomized?; /** Contains the counter slot. */ readonly counterSlot: Value<number, Slots.Number> | undefined; /** Contains the concatenation slot. */ readonly concatenationSlot: Value<string, Slots.Text> | undefined; /** Contains the score slot. */ readonly scoreSlot: Value<number, Slots.Numeric> | undefined; /** Contains the single choice slot. */ readonly singleChoiceSlot: Value<string, Slots.String> | undefined; get required(): boolean; private transform; private score; /** Retrieves a choice slot. */ choiceSlot(choice: IChoice): Value<boolean, Slots.Boolean> | undefined; /** Retrieves the choices. */ choices<T>(props: { readonly markdownifyToJSX: (md: string, lineBreaks?: boolean) => T; readonly tabIndex?: number; }): (Omit<IChoice, "description"> & { readonly label: T; readonly description?: T; readonly descriptionString?: string; readonly slot?: Value<boolean, Slots.Boolean>; readonly tabIndex?: number; readonly disabled: boolean; })[]; validate(): boolean; }