Skip to content

Commit

Permalink
fix: type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Waver-Velvet committed Sep 10, 2024
1 parent 6095135 commit 3cd10a6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion data/course.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ export type CourseObject = {
scores: CourseScoreObject[];
} & CourseExtraObject;

// @ts-expect-error the JSON is huge, so the type is not correctly inferred
// @ts-expect-error initially, rank, percentile, score and bayesianScore are not defined,
// but they will be added in the searchCourses function
export const dataCourseObjects: Record<string, CourseObject> = dataCourseJSON;
export const dataCourseKeys = Object.keys(dataCourseObjects);

Expand Down
1 change: 0 additions & 1 deletion data/cq/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ export interface CourseClassSchedule {
toTime: string | null;
}

// @ts-expect-error the JSON is huge, so the type is not correctly inferred
export const cq: CQ[] = cqObj;
export const cqTerms: Term[] = cqTermsObj.sort((a, b) =>
a.term.localeCompare(b.term),
Expand Down
3 changes: 2 additions & 1 deletion data/instructor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ export type InstructorObject = {
courses: Array<{ subject: string; number: string }>;
} & InstructorExtraObject;

// @ts-expect-error the JSON is huge, so the type is not correctly inferred
// @ts-expect-error initially, rank and percentile are not defined,
// but they will be added in the search function
export const dataInstructorObjects: Record<string, InstructorObject> =
dataInstructorJSON;
export const dataInstructorKeys = Object.keys(dataInstructorObjects);
Expand Down

0 comments on commit 3cd10a6

Please sign in to comment.