[#13452] Update tsconfig to follow fresh Angular 20 project, enforce strictTemplates#13491
Merged
samuelfangjw merged 5 commits intoTEAMMATES:masterfrom Feb 4, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Angular TypeScript configuration to align with Angular 20 defaults and enforces strict template type checking. The changes modernize the build configuration and introduce type safety improvements throughout the codebase.
Changes:
- Updated TypeScript configuration files to follow Angular 20 conventions
- Introduced helper functions for type-safe event target casting
- Added type assertion utilities for question and response details
- Fixed template type errors exposed by strict template checking
Reviewed changes
Copilot reviewed 97 out of 107 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.spec.json | Removed redundant compiler options inherited from base config |
| tsconfig.app.json | Updated file inclusion patterns to match Angular 20 conventions |
| src/web/types/event-target-caster.ts | Added helper functions for type-safe DOM element casting |
| src/web/types/question-details-impl/question-details-caster.ts | Added utilities for type-safe question details casting |
| src/web/types/response-details-impl/response-details-caster.ts | Added utilities for type-safe response details casting |
| Multiple .component.ts files | Updated to use inject() pattern and event target casting helpers |
| Multiple .component.html files | Fixed template bindings to satisfy strict type checking |
| Multiple .snap files | Updated test snapshots to reflect component changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.../app/components/question-types/question-response/rank-options-question-response.component.ts
Show resolved
Hide resolved
.../app/components/question-types/question-response/rank-options-question-response.component.ts
Show resolved
Hide resolved
.../pages-instructor/instructor-course-enroll-page/instructor-course-enroll-page.component.html
Show resolved
Hide resolved
src/web/app/components/copy-course-modal/copy-course-modal.component.html
Show resolved
Hide resolved
samuelfangjw
reviewed
Feb 3, 2026
Member
There was a problem hiding this comment.
Thanks for this, appreciate the attention to detail.
I still see a few warnings on console, likely caused be stricter checks. Don't know if you want to include it in this PR.
NG8107: The left side of this optional chain operation does not include 'null' or 'undefined' in its type, therefore the '?.' operator can be replaced with the '.' operator. [plugin angular-compiler]
src/web/app/components/course-edit-form/course-edit-form.component.html:109:95:
109 │ ...btn-success" type="submit" [disabled]="form?.invalid || isSaving"
╵ ~~~~~~~
among others.
...ents/account-requests-table/admin-edit-request-modal/admin-edit-request-modal.component.html
Show resolved
Hide resolved
...ructor/instructor-session-result-page/instructor-session-result-question-view.component.html
Show resolved
Hide resolved
...ession-individual-extension-page/instructor-session-individual-extension-page.component.html
Show resolved
Hide resolved
d275a06 to
0032776
Compare
0032776 to
5205503
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #13452
Outline of Solution
tsconfig.json,tsconfig.app.json, andtsconfig.spec.jsonto be based on a fresh Angular 20.3 project.strictTemplates=trueand fixed all violations755permission; they have been reverted back to644