Skip to content

Conversation

@JoshuaKGoldberg
Copy link
Owner

@JoshuaKGoldberg JoshuaKGoldberg commented Sep 26, 2025

PR Checklist

Overview

The propertySymbol being checked in isInConstContext might not be a ts.TransientSymbol with .links.

The test case is from typescript-eslint/typescript-eslint#11289 and fails on main.

💖

@codecov
Copy link

codecov bot commented Sep 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.13%. Comparing base (491c037) to head (0a6fd7f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #757      +/-   ##
==========================================
+ Coverage   61.00%   61.13%   +0.12%     
==========================================
  Files          35       35              
  Lines        2921     2923       +2     
  Branches      463      467       +4     
==========================================
+ Hits         1782     1787       +5     
+ Misses       1139     1136       -3     
Flag Coverage Δ
4.8.4 59.73% <0.00%> (+1.12%) ⬆️
latest 60.38% <100.00%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.

return (
!!propertySymbol.links &&
isTransientSymbolLinksFlagSet(
(propertySymbol as ts.TransientSymbol).links,
Copy link
Collaborator

@RebeccaStevens RebeccaStevens Sep 27, 2025

Choose a reason for hiding this comment

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

Why do we need the as cast here but not 2 lines above?

).toBe(false);
});

it("does not crash when the property is inside a readonly array of a generic arrow function parameter", () => {
Copy link
Collaborator

@RebeccaStevens RebeccaStevens Sep 27, 2025

Choose a reason for hiding this comment

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

does not crash

That's a pretty low expectation.

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.

🐛 Bug: Crash in isPropertyReadonlyInType on argument to readonly type parameter (?)

2 participants