infra changes

This commit is contained in:
Sriram Hariharan
2023-03-11 22:03:25 -06:00
parent 32b73da959
commit fe4f0e7ecd
8 changed files with 15 additions and 14 deletions

View File

@@ -66,7 +66,7 @@ export class Course {
/** Which semester is the course from */
semester: Semester;
constructor(course: Serialized<Course> | Course) {
constructor(course: Serialized<Course>) {
Object.assign(this, course);
this.schedule = new CourseSchedule(course.schedule);
this.instructors = course.instructors.map(i => new Instructor(i));

View File

@@ -37,7 +37,7 @@ export class CourseMeeting {
/** The location that the course is taught */
location?: Location;
constructor(meeting: Serialized<CourseMeeting> | CourseMeeting) {
constructor(meeting: Serialized<CourseMeeting>) {
Object.assign(this, meeting);
}

View File

@@ -7,7 +7,7 @@ import { CourseMeeting, Day, DAY_MAP } from './CourseMeeting';
export class CourseSchedule {
meetings: CourseMeeting[] = [];
constructor(courseSchedule?: Serialized<CourseSchedule> | CourseSchedule) {
constructor(courseSchedule?: Serialized<CourseSchedule>) {
if (!courseSchedule) {
return;
}