fix: type error

This commit is contained in:
Irtaza Akram
2026-01-08 11:54:06 +05:00
committed by Feanil Patel
parent 10705bc921
commit 5e5c92f487
2 changed files with 4 additions and 2 deletions

View File

@@ -371,6 +371,8 @@ export const GradingMethodKeys = StrictDict({
FIRST_SCORE: 'first_score',
});
export type GradingMethodKey = typeof GradingMethodKeys[keyof typeof GradingMethodKeys];
export const GradingMethod = StrictDict({
[GradingMethodKeys.LAST_SCORE]: {
id: 'authoring.problemeditor.settings.gradingmethod.last_score',

View File

@@ -9,7 +9,7 @@ import * as video from './video';
import * as problem from './problem';
import * as game from './game';
import type { RequestKeys, RequestStates } from '../constants/requests';
import { AdvancedProblemType, GradingMethodKeys, ProblemType } from '../constants/problem';
import { AdvancedProblemType, type GradingMethodKey, ProblemType } from '../constants/problem';
export { default as thunkActions } from './thunkActions';
@@ -176,7 +176,7 @@ export interface EditorState {
scoring: {
weight: number;
attempts: { unlimited: boolean; number: number | null; };
gradingMethod: GradingMethodKeys.LAST_SCORE;
gradingMethod: GradingMethodKey;
},
hints: any[];
timeBetween: number;