UNPKG

@trivia-api/fetch

Version:

Functions to fetch data from The Trivia API.

12 lines (11 loc) 407 B
import { TranslatedLanguage } from "@trivia-api/models"; export type ValidateAnswerParams = { questionId: string; answer: string; language?: TranslatedLanguage; apiKey: string; }; export declare const validateAnswer: ({ questionId, answer, apiKey, language }: ValidateAnswerParams, host?: string) => Promise<{ isCorrect?: boolean | undefined; correctAnswer?: string | undefined; }>;