-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
42 lines (38 loc) · 1.18 KB
/
Copy pathtypes.ts
File metadata and controls
42 lines (38 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//C: Інтерфейс конфігурації генератора завдань
//C: Task generator configuration interface
export interface IGeneratorConfig {
testID: string
template: string
condition: string
variables: Record<string, IVariableConfig>
constraints: IConstraints
}
//C: Конфігурація змінних для генерації
//C: Variables configuration for generation
export interface IVariableConfig {
range?: [number, number]
values?: number[]
exclude?: number[]
}
//C: Обмеження для результатів генерації
//C: Constraints for generation results
export interface IConstraints {
minResult?: number
maxResult?: number
integerResult?: boolean
canBeNegative?: boolean
canGenerateWrongAnswer?: boolean
}
//C: Інтерфейс згенерованого завдання
//C: Generated task interface
export interface IGeneratedTask {
testID: string
condition: string
answers: string[]
correctAnswer: string
}
//C: Тип математичної функції для генератора
//C: Math function type for generator
export type MathFunction = (
...args: any[]
) => string | number | boolean