UNPKG

@trivia-api/models

Version:

Models for The Trivia API.

21 lines (20 loc) 768 B
import { V1Category } from "./v1/Category"; import { Category } from "./v2"; /** * Used to map categories to common other formattings and spellings */ export declare const CategoryMap: Map<V1Category, string[]>; /** * Gets a DB Question category from any input string. * @param input * @returns */ export declare const getCategory: (input: string) => V1Category; /** * Convert a V1 category to a V2 category * @param category - The V1 category to convert * @returns The V2 category */ export declare const convertV1OrV2CategoryToV2: (category: V1Category | Category) => Category; export declare const convertV1OrV2CategoryToV1: (category: V1Category | Category) => V1Category; export declare const convertUnknownCategoryToV2: (category: string) => Category;