nuxt-prawo-jazdy/types/index.ts
NetMan 63121da4b7 postgres -> sqlite, pinia/middleware fix?
other smaller: little type fixes, little changes to ui - more readable category chooser
- result screen with correct, incorrect and chosen answers
little changes to readme
2025-12-13 16:07:23 +01:00

27 lines
624 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 type Question = BasicQuestion | AdvancedQuestion | null | undefined;
export interface ResultType {
question: Question;
chosen_answer: string;
correct_answer: string | null;
chosen_is_correct: boolean | undefined;
}
export interface ResultEndType {
basic: ResultType[];
advanced: ResultType[];
}