Skip to content

Also match TS's unresolved intrinsic for error-any detection (#107 follow-up) - #134

Merged
jagguji merged 1 commit into
mainfrom
fix/107-unresolved-intrinsic
Jul 10, 2026
Merged

Also match TS's unresolved intrinsic for error-any detection (#107 follow-up)#134
jagguji merged 1 commit into
mainfrom
fix/107-unresolved-intrinsic

Conversation

@jagguji

@jagguji jagguji commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Follow-up from the #132 review (finding 2).

TypeScript has a second any-flavored intrinsic — unresolvedType (intrinsicName === 'unresolved') — used by some unresolvable-reference paths. The #107 detection now matches both error and unresolved, so a sibling path reaching classify gets the same 🛑-flagged placeholder instead of the silent 'a salvage.

No author-written any carries either intrinsic, so there is no false-positive risk: all 90 goldens and all 9 benchmark baselines are byte-identical. The error-any-unresolved fixture remains the executable contract; docs/TYPE_MAPPING.md's ERROR-any row now names both intrinsics.

For the other #132 review findings: the report.mjs escaping (finding 1) was already fixed in #132 itself (mdCell, CodeQL green pre-merge); the report-bucket blindness reminder (finding 3) is now tracked as #133.

🤖 Generated with Claude Code

…follow-up)

Belt-and-braces from the #132 review: TypeScript has a second any-flavored
intrinsic (`unresolvedType`, intrinsicName 'unresolved') used by some
unresolvable-reference paths. No author-written `any` carries either
intrinsic, so no false-positive risk; all goldens and baselines unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Benchmark: ✅ PASS

Package Compile Diff vs baseline usable review broken Verdict
@juspay/blend-design-system@0.0.36 identical 107 0 0 ✅ PASS
@juspay/blend-design-system@0.0.37-beta.8 identical 222 0 0 ✅ PASS
react-day-picker@10.0.1 identical 26 0 0 ✅ PASS
react-tooltip@6.0.7 identical 1 0 0 ✅ PASS
react-markdown@10.1.0 identical 0 2 0 ✅ PASS
@smastrom/react-rating@1.5.0 identical 1 0 0 ✅ PASS
clsx@2.1.1 identical 0 0 0 ✅ PASS
hono@4.12.25 identical 0 0 0 ✅ PASS
@base-ui-components/react@1.0.0-rc.0 identical 195 0 0 ✅ PASS

@pkg-pr-new

pkg-pr-new Bot commented Jul 10, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@juspay/rescript-bindgen@134

commit: c24f769

@jagguji
jagguji merged commit 05e7a13 into main Jul 10, 2026
12 checks passed
@jagguji
jagguji deleted the fix/107-unresolved-intrinsic branch July 10, 2026 20:59

@Tara-ag Tara-ag left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Reviewed PR #134.

Files reviewed: 2 (src/extract.mjs, docs/TYPE_MAPPING.md)

New issues raised: 0

Analysis:

  • The change extends the existing #107 ERROR-any detection to also match TypeScript's unresolved intrinsic (intrinsicName === 'unresolved'), alongside the existing error intrinsic.
  • This prevents an unresolvable reference path from being silently salvaged as a component-generic 'a and instead keeps the 🛑-flagged string placeholder, consistent with the "flag, don't fake" rule and the 'a-only-for-genuine-generics contract in docs/TYPE_MAPPING.md.
  • The condition is deterministic (string equality), introduces no unsafe casts, and does not affect author-written any (which carries intrinsicName === 'any').
  • The error-any-unresolved fixture and docs/TYPE_MAPPING.md row are updated together, satisfying the maintenance-loop requirement.

Decision: Approve. No blocking criteria are met.

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