Skip to content

Commit 5e5c92f

Browse files
irtazaakramfeanil
authored andcommitted
fix: type error
1 parent 10705bc commit 5e5c92f

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/editors/data/constants/problem.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,8 @@ export const GradingMethodKeys = StrictDict({
371371
FIRST_SCORE: 'first_score',
372372
});
373373

374+
export type GradingMethodKey = typeof GradingMethodKeys[keyof typeof GradingMethodKeys];
375+
374376
export const GradingMethod = StrictDict({
375377
[GradingMethodKeys.LAST_SCORE]: {
376378
id: 'authoring.problemeditor.settings.gradingmethod.last_score',

src/editors/data/redux/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import * as video from './video';
99
import * as problem from './problem';
1010
import * as game from './game';
1111
import type { RequestKeys, RequestStates } from '../constants/requests';
12-
import { AdvancedProblemType, GradingMethodKeys, ProblemType } from '../constants/problem';
12+
import { AdvancedProblemType, type GradingMethodKey, ProblemType } from '../constants/problem';
1313

1414
export { default as thunkActions } from './thunkActions';
1515

@@ -176,7 +176,7 @@ export interface EditorState {
176176
scoring: {
177177
weight: number;
178178
attempts: { unlimited: boolean; number: number | null; };
179-
gradingMethod: GradingMethodKeys.LAST_SCORE;
179+
gradingMethod: GradingMethodKey;
180180
},
181181
hints: any[];
182182
timeBetween: number;

0 commit comments

Comments
 (0)