ahbeng/NUSMods

View on GitHub
website/src/data/academic-calendar.ts

Summary

Maintainability
A
0 mins
Test Coverage
import academicCalendarJSON from './academic-calendar.json';

// Force TS to accept our typing instead of inferring from the JSON
type DateTuple = [number, number, number];
const academicCalendar = academicCalendarJSON as unknown as {
  [year: string]: {
    [semester: string]: { start: DateTuple };
  };
};

export default academicCalendar;