Skip to content

Fix TypeScript errors in libs/utils (PR A) - #4

Closed
ronaldw07 wants to merge 3 commits into
mainfrom
fix/tsconfig-libs-noai-2
Closed

Fix TypeScript errors in libs/utils (PR A)#4
ronaldw07 wants to merge 3 commits into
mainfrom
fix/tsconfig-libs-noai-2

Conversation

@ronaldw07

Copy link
Copy Markdown
Owner

This PR fixes TypeScript errors introduced by stricter compiler settings by adding runtime guards and small type adjustments in libs and utility code.\n\nChanges:\n- Workspace TypeScript adjustments and path mappings\n- Safer access / null guards in apps/antalmanac/src/lib/* (download, termData, grades, websoc, tourExampleGeneration, locations)\n- Safer patterns in components under Calendar and RightPane\n- Test updates: apps/antalmanac/tests/termData.tsx\n\nRun locally: pnpm -w tsc --noEmit to verify error reduction before merging.

ronald wen and others added 3 commits January 17, 2026 17:32
Updates TypeScript configuration to align with Total TypeScript recommendations for modern React/Next.js applications.

Changes:
- Update target from esnext to es2022
- Update module from esnext to preserve (for modern bundlers)
- Update moduleResolution from node to bundler
- Update lib to use es2022 instead of esnext
- Add moduleDetection: force
- Add verbatimModuleSyntax: true
- Add noUncheckedIndexedAccess: true (prevents array/object access without checking if defined)
- Add noImplicitOverride: true

Fixes icssc#1379
- Update tsconfig.json files in packages and app to match Total TypeScript cheat sheet
- Fix FuzzySearch.tsx lint errors (unused import, lexical declaration)
- Add defensive checks in Schedules.ts, Map.tsx, scheduleHelpers.ts
- Fix undefined access in download.ts and analytics.ts

Fixes icssc#1379
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant