Skip to content

Add an early throw for the this.querier and remove the non-null asserts in the cli codebase#6145

Merged
canova merged 2 commits into
firefox-devtools:mainfrom
canova:push-ntvwkmspkqpy
Jul 7, 2026
Merged

Add an early throw for the this.querier and remove the non-null asserts in the cli codebase#6145
canova merged 2 commits into
firefox-devtools:mainfrom
canova:push-ntvwkmspkqpy

Conversation

@canova

@canova canova commented Jul 6, 2026

Copy link
Copy Markdown
Member

Main | Deploy preview

This is only a refactor without changing the behavior. I wanted to remove these TS non-null asserts for a while. Now this function checks the this.querier at the start of the function and early throws, which allows TS to reduce the type to non-null, so we don't have to include ! every time we access it.

@canova canova requested a review from fatadel July 6, 2026 08:22
@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.43%. Comparing base (a812a34) to head (77da7e9).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6145   +/-   ##
=======================================
  Coverage   83.43%   83.43%           
=======================================
  Files         342      342           
  Lines       36356    36356           
  Branches    10099    10195   +96     
=======================================
  Hits        30333    30333           
  Misses       5595     5595           
  Partials      428      428           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@canova canova force-pushed the push-ntvwkmspkqpy branch from 65faba2 to 3e5b731 Compare July 6, 2026 08:28

@fatadel fatadel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for easing the devs' lives! 😁

@canova canova enabled auto-merge (squash) July 7, 2026 10:07
@canova canova merged commit aeb4192 into firefox-devtools:main Jul 7, 2026
21 checks passed
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