import { CovidZoneId } from '../services/getCovidZones' ; export type AcadYear = string ; export type ClassNo = string ; export type DayText = string ; export type Department = string ; export type StartTime = string ; export type EndTime = string ; export type Faculty = string ; export type LessonType = string ; export type LessonTime = StartTime | EndTime ; export type ModuleCode = string ; export type ModuleTitle = string ; export type Semester = number ; export type Workload = string | number [ ] ; export type Venue = string ; export type WeekRange = { start : string ; end : string ; weekInterval ? : number ; weeks ? : number [ ] ; } ; export type Weeks = number [ ] | WeekRange ; export type PrereqTree = string | { and ? : PrereqTree [ ] ; or ? : PrereqTree [ ] ; } ; export type Day = 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday' | 'Sunday' ; export const WorkingDaysOfWeek = [ 'Monday' , 'Tuesday' , 'Wednesday' , 'Thursday' , 'Friday' , 'Saturday' , ] ; export const DaysOfWeek = [ ... WorkingDaysOfWeek , 'Sunday' ] ; export type Time = 'Morning' | 'Afternoon' | 'Evening' ; export const TimesOfDay = [ 'Morning' , 'Afternoon' , 'Evening' ] ; export type ModuleLevel = 1 | 2 | 3 | 4 | 5 | 6 | 8 ; export const Semesters = [ 1 , 2 , 3 , 4 ] ; export type WorkloadComponent = 'Lecture' | 'Tutorial' | 'Laboratory' | 'Project' | 'Preparation' ; export type RawLesson = Readonly < { classNo : ClassNo ; day : DayText ; endTime : EndTime ; lessonType : LessonType ; startTime : StartTime ; venue : Venue ; weeks : Weeks ; size : number ; covidZone : CovidZoneId ; } > ; export type SemesterData = { semester : Semester ; timetable : RawLesson [ ] ; covidZones : CovidZoneId [ ] ; examDate ? : string ; examDuration ? : number ; } ; export type NUSModuleAttributes = Partial < { year : boolean ; su : boolean ; grsu : boolean ; ssgf : boolean ; sfs : boolean ; lab : boolean ; ism : boolean ; urop : boolean ; fyp : boolean ; mpes1 : boolean ; mpes2 : boolean ; } > ; export type Module = { acadYear : AcadYear ; moduleCode : ModuleCode ; title : ModuleTitle ; description ? : string ; moduleCredit : string ; department : Department ; faculty : Faculty ; workload ? : Workload ; aliases ? : ModuleCode [ ] ; attributes ? : NUSModuleAttributes ; prerequisite ? : string ; corequisite ? : string ; preclusion ? : string ; semesterData : SemesterData [ ] ; prereqTree ? : PrereqTree ; fulfillRequirements ? : ModuleCode [ ] ; } ; export type ModuleCondensed = Readonly < { moduleCode : ModuleCode ; title : ModuleTitle ; semesters : number [ ] ; } > ; export type SemesterDataCondensed = Readonly < Omit < SemesterData , 'timetable' > > ; export type ModuleInformation = Readonly < { moduleCode : ModuleCode ; title : ModuleTitle ; description ? : string ; moduleCredit : string ; department : Department ; faculty : Faculty ; workload ? : Workload ; attributes ? : NUSModuleAttributes ; prerequisite ? : string ; corequisite ? : string ; preclusion ? : string ; semesterData : SemesterDataCondensed [ ] ; } > ; export type Aliases = { [ moduleCode ] : ModuleCode [ ] ; } ;