feat: initial commit
This commit is contained in:
23
types.ts
Normal file
23
types.ts
Normal file
@ -0,0 +1,23 @@
|
||||
export type ExercisePartType = 'struct-definition' | 'typedef-struct' | 'array-initialization' | 'pointer-manipulation' | 'printf' | 'function-definition' | 'main-function';
|
||||
|
||||
export interface ExercisePart {
|
||||
id: string;
|
||||
prompt: string;
|
||||
solution: string;
|
||||
points: number;
|
||||
type: ExercisePartType;
|
||||
}
|
||||
|
||||
export interface Exercise {
|
||||
id: string;
|
||||
title: string;
|
||||
parts: ExercisePart[];
|
||||
explanation: string;
|
||||
}
|
||||
|
||||
export interface CheckResult {
|
||||
partId: string;
|
||||
isCorrect: boolean;
|
||||
explanation: string;
|
||||
error?: string; // To hold API or parsing errors
|
||||
}
|
Reference in New Issue
Block a user