Skip to content

Activated flag strictNullInputTypes on Angular 21 - #7151

Open
cdavalos7 wants to merge 2 commits into
tensorflow:masterfrom
cdavalos7:feature/strict-null-input-types-on-21
Open

Activated flag strictNullInputTypes on Angular 21#7151
cdavalos7 wants to merge 2 commits into
tensorflow:masterfrom
cdavalos7:feature/strict-null-input-types-on-21

Conversation

@cdavalos7

@cdavalos7 cdavalos7 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Motivation for features / changes

Enable strictNullInputTypes to strengthen Angular template type safety, catch nullable input bindings at build time, and prevent UI errors caused by loading or unavailable data. The change also modernizes synchronous NgRx selector bindings with Angular signals and reduces redundant reactive subscriptions.

Technical description of changes

  • Enabled strictNullInputTypes: true in tsconfig.json.
  • Migrated synchronous NgRx selector bindings from Observable + AsyncPipe to selectSignal or toSignal({requireSync: true}).
  • Kept AsyncPipe for genuinely asynchronous streams and widened their receiving inputs when null is a valid value.
  • Updated input types, template guards, and fallback values to handle null and undefined explicitly.
  • Updated tests and NgRx mocks to provide synchronous selector state where required.
  • Simplified three containers by replacing duplicate RxJS-to-Signal conversions with computed derived state.

@cdavalos7 cdavalos7 changed the title Activated flag strictNullInputTypes, causing breaking async pipes is … Activated flag strictNullInputTypes on Angular 21 Aug 26, 2026
@cdavalos7
cdavalos7 marked this pull request as ready for review September 1, 2026 21:05
@cdavalos7
cdavalos7 requested a review from arcra September 1, 2026 22:07
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