Skip to content

Fix custom sel.net typing and add regression coverage#2093

Open
mohan-bee wants to merge 1 commit intotscircuit:mainfrom
mohan-bee:fix-sel-custom-net-typing-clean
Open

Fix custom sel.net typing and add regression coverage#2093
mohan-bee wants to merge 1 commit intotscircuit:mainfrom
mohan-bee:fix-sel-custom-net-typing-clean

Conversation

@mohan-bee
Copy link
Copy Markdown

Recent benchmark runs repeatedly hit TypeScript errors like Property 'USB_DP_RAW' does not exist on type 'NetSelFn' because the distinction between built-in and custom net selectors was not
obvious in core: built-in nets use the shorthand sel.net.GND, while custom nets require the typed callable form sel.net<"USB_DP_RAW" | "USB_DM_RAW">().USB_DP_RAW.

This PR makes that contract explicit in the source of truth, adds regression coverage, and improves selector error messages so users are pointed to the correct custom-net syntax instead of discovering it through trial and error.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tscircuit-core-benchmarks Ready Ready Preview, Comment Apr 2, 2026 5:34pm

Request Review

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.

1 participant