UNPKG

@coorpacademy/progression-engine

Version:

12 lines (10 loc) 2.86 kB
// @flow import type {Question, Answer, Config} from "../../types"; import checkAnswerCorrectness from "../../check-answer-correctness"; import zip from "lodash/fp/zip"; import trim from "lodash/fp/trim"; import pipe from "lodash/fp/pipe"; import map from "lodash/fp/map"; declare export function assertCorrect(t: any, config: {answerBoundaryLimit: number, lives: number, livesDisabled: boolean, maxTypos: number, remainingLifeRequests: number, slidesToComplete: number, starsPerAskingClue: number, starsPerCorrectAnswer: number, starsPerResourceViewed: number, version: string}, question: {content: {answers: Array<Array<string>>}, type: "qcm"} | {content: {answers: Array<Array<string>>}, type: "qcmGraphic"} | {content: {answers: Array<Array<string>>, matchOrder: boolean}, type: "qcmDrag"} | {content: {answers: Array<Array<string>>}, type: "slider"} | {content: {answers: Array<Array<string>>, maxTypos?: ?number}, type: "basic"} | {content: {answers: Array<Array<string>>, choices: Array<{type: "text" | "select"}>, matchOrder: boolean, maxTypos?: ?number}, type: "template"}, givenAnswer: Array<string>): void; declare export function assertIncorrect(t: any, config: {answerBoundaryLimit: number, lives: number, livesDisabled: boolean, maxTypos: number, remainingLifeRequests: number, slidesToComplete: number, starsPerAskingClue: number, starsPerCorrectAnswer: number, starsPerResourceViewed: number, version: string}, question: {content: {answers: Array<Array<string>>}, type: "qcm"} | {content: {answers: Array<Array<string>>}, type: "qcmGraphic"} | {content: {answers: Array<Array<string>>, matchOrder: boolean}, type: "qcmDrag"} | {content: {answers: Array<Array<string>>}, type: "slider"} | {content: {answers: Array<Array<string>>, maxTypos?: ?number}, type: "basic"} | {content: {answers: Array<Array<string>>, choices: Array<{type: "text" | "select"}>, matchOrder: boolean, maxTypos?: ?number}, type: "template"}, givenAnswer: Array<string>, expectedCorrections: Array<boolean>): void; declare export function assertIncorrectEmptyAnswer(t: any, config: {answerBoundaryLimit: number, lives: number, livesDisabled: boolean, maxTypos: number, remainingLifeRequests: number, slidesToComplete: number, starsPerAskingClue: number, starsPerCorrectAnswer: number, starsPerResourceViewed: number, version: string}, question: {content: {answers: Array<Array<string>>}, type: "qcm"} | {content: {answers: Array<Array<string>>}, type: "qcmGraphic"} | {content: {answers: Array<Array<string>>, matchOrder: boolean}, type: "qcmDrag"} | {content: {answers: Array<Array<string>>}, type: "slider"} | {content: {answers: Array<Array<string>>, maxTypos?: ?number}, type: "basic"} | {content: {answers: Array<Array<string>>, choices: Array<{type: "text" | "select"}>, matchOrder: boolean, maxTypos?: ?number}, type: "template"}, givenAnswer: Array<string>): void;