feat: enable TS strict mode (#168)
* feat: enable TS strict mode * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: colors bug with default * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: text type errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors - add definite assignment assertion * fix: strict TS errors - add definite assignment assertion * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix(ESLint): error on no-explicit-any * fix: type annotations for any types * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors (and remove packages) * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * fix: strict TS errors * feat: enable React.StrictMode * fix: strict TS errors (done!) * fix: build error * fix: replace no-explicit-any assertions * refactor: cleanup * refactor: more cleanup * style: prettier --------- Co-authored-by: Lukas Zenick <lukas@utexas.edu> Co-authored-by: Razboy20 <razboy20@gmail.com>
This commit is contained in:
@@ -20,7 +20,7 @@ export async function queryAggregateDistribution(course: Course): Promise<[Distr
|
||||
|
||||
let row: Required<CourseSQLRow> = {} as Required<CourseSQLRow>;
|
||||
res.columns.forEach((col, i) => {
|
||||
row[res.columns[i]] = res.values[0][i];
|
||||
row[col as keyof CourseSQLRow] = res.values[0]![i]! as never;
|
||||
});
|
||||
|
||||
const distribution: Distribution = {
|
||||
@@ -48,6 +48,9 @@ export async function queryAggregateDistribution(course: Course): Promise<[Distr
|
||||
|
||||
rawSemesters.forEach((sem: string) => {
|
||||
const [season, year] = sem.split(' ');
|
||||
if (!season || !year) {
|
||||
throw new Error('Season is undefined');
|
||||
}
|
||||
semesters.push({ year: parseInt(year, 10), season: season as Semester['season'] });
|
||||
});
|
||||
|
||||
@@ -92,7 +95,7 @@ export async function querySemesterDistribution(course: Course, semester: Semest
|
||||
|
||||
let row: Required<CourseSQLRow> = {} as Required<CourseSQLRow>;
|
||||
res.columns.forEach((col, i) => {
|
||||
row[res.columns[i]] = res.values[0][i];
|
||||
row[col as keyof CourseSQLRow] = res.values[0]![i]! as never;
|
||||
});
|
||||
|
||||
const distribution: Distribution = {
|
||||
|
||||
Reference in New Issue
Block a user