Initial Commit
This commit is contained in:
21
lib/problems/types.ts
Normal file
21
lib/problems/types.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
export type Difficulty = 1 | 2 | 3;
|
||||
|
||||
export type MathAnswer =
|
||||
| { kind: "fraction"; numerator: number; denominator: number }
|
||||
| { kind: "decimal"; value: number }
|
||||
| { kind: "integer"; value: number }
|
||||
| { kind: "ratio"; parts: number[] }
|
||||
| { kind: "standardForm"; coefficient: number; exponent: number };
|
||||
|
||||
export interface SolutionStep {
|
||||
explanation: string;
|
||||
math?: string;
|
||||
}
|
||||
|
||||
export interface MathProblem {
|
||||
id: string;
|
||||
prompt: string;
|
||||
answer: MathAnswer;
|
||||
hints: string[];
|
||||
steps: SolutionStep[];
|
||||
}
|
||||
Reference in New Issue
Block a user