Skip to content

Activated flag strictNullInputTypes on Angular 21 - #7151

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

cdavalos7 wants to merge 4 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

@arcra arcra left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think at least we should aim to remove the ! characters, possibly define default values.

Comment thread tensorboard/webapp/metrics/views/card_renderer/histogram_card_container.ts Outdated
Comment thread tensorboard/webapp/metrics/views/main_view/card_grid_container.ts
…alues, and convert redundant selectors to computed signals
@cdavalos7
cdavalos7 requested a review from arcra September 17, 2026 21:06
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.

2 participants