UNPKG

@trivia-api/models

Version:

Models for The Trivia API.

28 lines (27 loc) 710 B
import type { BaseQuestion } from "@trivia-api/client"; export type TextChoiceQuestionWithImage = BaseQuestion & { /** * String formulation of the questions * @example 'What is the capital of France?' */ question: { text: string; image: { url: string; }; }; /** * The correct answer */ correctAnswer: string; /** * Array of incorrect answers */ incorrectAnswers: string[]; /** * Will always be multiple choice for now, but the prop is * here to allow for different question types in future * (e.g. true/false, picture questions, place in order) */ type: "text_choice_with_image"; };