You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some of my opinions on how we can make the existing requirement computation more maintainable. None of the issues below should block merging a PR.
Types of operator ('and' | 'or' | null) is very confusing.
They don't seem to relate to double counting. A better name would be requiredCourseCheckerStrategy: 'all-of' | 'any-of'.
Bloated BaseRequirement
Instead of combining credits | courses | self-check requirements into a single type. We should use TypeScript's disjointed union capability to split them into 3 different types, and do pattern matching on them. In this way, we can get rid of a bunch of null and undefined possibilibity that are just added for self-check types of courses.
Requirement with several fulfillment strategies
Related to the above issue, we probably should create a new type for requirement like
Some of my opinions on how we can make the existing requirement computation more maintainable. None of the issues below should block merging a PR.
Types of
operator
('and' | 'or' | null
) is very confusing.They don't seem to relate to double counting. A better name would be
requiredCourseCheckerStrategy: 'all-of' | 'any-of'
.Bloated
BaseRequirement
Instead of combining
credits
|courses
|self-check
requirements into a single type. We should use TypeScript's disjointed union capability to split them into 3 different types, and do pattern matching on them. In this way, we can get rid of a bunch ofnull
andundefined
possibilibity that are just added forself-check
types of courses.Requirement with several fulfillment strategies
Related to the above issue, we probably should create a new type for requirement like
The text was updated successfully, but these errors were encountered: