Skip to content

[#13452] Update tsconfig to follow fresh Angular 20 project, enforce strictTemplates#13491

Merged
samuelfangjw merged 5 commits intoTEAMMATES:masterfrom
wkurniawan07:strict-templates
Feb 4, 2026
Merged

[#13452] Update tsconfig to follow fresh Angular 20 project, enforce strictTemplates#13491
samuelfangjw merged 5 commits intoTEAMMATES:masterfrom
wkurniawan07:strict-templates

Conversation

@wkurniawan07
Copy link
Member

@wkurniawan07 wkurniawan07 commented Feb 2, 2026

Fixes #13452

Outline of Solution

  1. Reworked tsconfig.json, tsconfig.app.json, and tsconfig.spec.json to be based on a fresh Angular 20.3 project.
  2. Enforced strictTemplates=true and fixed all violations
  3. Some frontend files unnecessary have 755 permission; they have been reverted back to 644

@wkurniawan07 wkurniawan07 requested a review from Copilot February 2, 2026 15:17
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

@samuelfangjw samuelfangjw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

@samuelfangjw samuelfangjw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes!

@samuelfangjw samuelfangjw self-assigned this Feb 4, 2026
@samuelfangjw samuelfangjw added this to the V9.0.0-beta.7 milestone Feb 4, 2026
@samuelfangjw samuelfangjw added the c.Task Other non-user-facing works, e.g. refactoring, adding tests label Feb 4, 2026
@samuelfangjw samuelfangjw merged commit 8c37417 into TEAMMATES:master Feb 4, 2026
11 checks passed
@wkurniawan07 wkurniawan07 deleted the strict-templates branch February 4, 2026 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c.Task Other non-user-facing works, e.g. refactoring, adding tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade to Angular 20 and Node.js 24

2 participants