Skip to content

fix: restore assert method with implicit inference - #13

Merged
tpoisseau merged 2 commits into
mainfrom
restore-assert
Jul 20, 2026
Merged

fix: restore assert method with implicit inference#13
tpoisseau merged 2 commits into
mainfrom
restore-assert

Conversation

@tpoisseau

@tpoisseau tpoisseau commented Jul 20, 2026

Copy link
Copy Markdown
Member

Restore implicit typescript inference like
assert(ivView && ivView.xVariable && ivView.yVariable); which assert ivView, ivView.xVariable and ivView.yVariable are not falsy.

Or assert(color.kind === 'fixed', 'Only fixed colors are supported'); with kind for type discriminated union assert color is {kind: 'color', color: string}

Refs: zakodium-oss/react-science#1028 (comment)
Refs: f107355#diff-36600636ec4d5ea8a05c7eabcca9531918c5e02d66d92180ad367c8e67e79a6a

Restore implicit typescript inference like
`assert(ivView && ivView.xVariable && ivView.yVariable);` which assert
`ivView`, `ivView.xVariable` and `ivView.yVariable` are not falsy.

Or `assert(color.kind === 'fixed', 'Only fixed colors are supported');`
with `kind` for type discriminated union assert `color` is `{kind: 'color', color: string}`

Refs: zakodium-oss/react-science#1028 (comment)
@codecov-commenter

codecov-commenter commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (2bcb5b5) to head (6ebe78e).

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #13   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         5           
  Lines           25        25           
  Branches         6         6           
=========================================
  Hits            25        25           

☔ 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.

@tpoisseau
tpoisseau requested a review from targos July 20, 2026 13:44
@tpoisseau
tpoisseau merged commit be74eac into main Jul 20, 2026
8 checks passed
@tpoisseau
tpoisseau deleted the restore-assert branch July 20, 2026 13:55
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.

3 participants