UNPKG

@trivia-api/models

Version:

Models for The Trivia API.

26 lines (25 loc) 649 B
import { BaseV1Question } from "./BaseQuestion"; /** * V1 Question as returned by the API */ export type Question = BaseV1Question & { /** * The correct answer */ correctAnswer: string; /** * Array of incorrect answers */ incorrectAnswers: string[]; /** * String formulation of the questions * @example 'What is the capital of France?' */ question: 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: "Multiple Choice"; };