Skip to content

Commit

Permalink
fix: type cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Destaq committed Dec 3, 2024
1 parent 40c073a commit 2ac629b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/components/Semester/Semester.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<delete-note-modal
@delete-note="deleteNote"
@close-delete-note="closeDeleteNoteModal"
v-if="isDeleteNoteOpen"
v-if="isDeleteNoteOpen && noteCourseUniqueID !== undefined"
:noteCourseUniqueID="noteCourseUniqueID"
/>
<button
Expand Down
23 changes: 11 additions & 12 deletions src/user-data.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Convention:
// - all the types describing data in Firestore is prefixed with Firestore.
// - all the data describing data converted from Firestore to be used by the app is prefixed with App.
import { Timestamp } from 'firebase-admin/firestore';

type FirestoreUserName = {
readonly firstName: string;
Expand Down Expand Up @@ -45,7 +44,7 @@ type FirestoreSemestersData = {
readonly orderByNewest: boolean;
};

type FirestoreCollegeOrMajorOrMinor = { readonly acronym: string };
type FirestoreCollegeOrMajorOrMinor = { readonly acronym: string; };

/** Represents the name of an exam a student can take for transfer credit */
type TransferExamType = 'AP' | 'IB' | 'CASE';
Expand All @@ -57,7 +56,7 @@ type FirestoreTransferExam = {
readonly type?: TransferExamType; // TODO @bshen migrate away
};

type FirestoreCollegeMajorMinorOrGrad = { readonly acronym: string };
type FirestoreCollegeMajorMinorOrGrad = { readonly acronym: string; };
type FirestoreOnboardingUserData = {
readonly gradYear: string;
readonly gradSem: FirestoreSemesterSeason | '';
Expand All @@ -84,7 +83,7 @@ type FirestoreCourseOptInOptOutChoices = {
* It's for attaching completely unknown courses to a requirement
* (e.g. opt-in CS 2112 for history requirement).
*/
readonly arbitraryOptIn: { readonly [requirement: string]: readonly string[] };
readonly arbitraryOptIn: { readonly [requirement: string]: readonly string[]; };
};
type FirestoreOverriddenFulfillmentChoices = {
readonly [courseUniqueId: string]: FirestoreCourseOptInOptOutChoices;
Expand All @@ -94,7 +93,7 @@ type FirestoreUserData = {
readonly name: FirestoreUserName;
readonly orderByNewest: boolean;
readonly toggleableRequirementChoices: AppToggleableRequirementChoices;
readonly subjectColors: { readonly [subject: string]: string };
readonly subjectColors: { readonly [subject: string]: string; };
readonly uniqueIncrementer: number;
readonly userData: FirestoreOnboardingUserData;
// TODO: add overriddenFulfillmentChoices once we connect new requirement flow to prod.
Expand Down Expand Up @@ -122,18 +121,18 @@ type FirestoreTrackUsersOnboardingData = {
undergradUsers: number;
gradUsers: number;
undergradAndGradUsers: number;
majorFrequences: { readonly [group: string]: number };
minorFrequencies: { readonly [group: string]: number };
collegeFrequencies: { readonly [group: string]: number };
graduateProgramFrequencies: { readonly [group: string]: number };
majorFrequences: { readonly [group: string]: number; };
minorFrequencies: { readonly [group: string]: number; };
collegeFrequencies: { readonly [group: string]: number; };
graduateProgramFrequencies: { readonly [group: string]: number; };
averageNumberUndergradMajors: number;
averageNumberUndergradMinors: number;
averageNumberUndergradAPIBExams: number;
entranceYearFrequencies: { readonly [group: string]: number };
gradYearFrequencies: { readonly [group: string]: number };
entranceYearFrequencies: { readonly [group: string]: number; };
gradYearFrequencies: { readonly [group: string]: number; };
};

type FirestoreUniqueIncrementer = { readonly uniqueIncrementer: number };
type FirestoreUniqueIncrementer = { readonly uniqueIncrementer: number; };

interface CornellCourseRosterCourse {
readonly crseId: number;
Expand Down

0 comments on commit 2ac629b

Please sign in to comment.