24 lines
555 B
TypeScript
24 lines
555 B
TypeScript
export interface BasicQuestion {
|
|
id: number | null;
|
|
correct_answer: string | null;
|
|
media_url: string | null;
|
|
weight: number | null;
|
|
text: string | null;
|
|
}
|
|
|
|
export interface AdvancedQuestion extends BasicQuestion {
|
|
answer_a: string | null;
|
|
answer_b: string | null;
|
|
answer_c: string | null;
|
|
}
|
|
|
|
export interface ResultType<T> {
|
|
question: T | undefined;
|
|
chosen_answer: string;
|
|
chosen_is_correct: boolean | undefined;
|
|
}
|
|
|
|
export interface ResultEndType {
|
|
basic: ResultType<BasicQuestion>[];
|
|
advanced: ResultType<AdvancedQuestion>[];
|
|
}
|