Skip to content

feat(resistor): accept documented rating props - #833

Open
Flame119052 wants to merge 2 commits into
tscircuit:mainfrom
Flame119052:cursor/resistor-rating-props-73fd
Open

feat(resistor): accept documented rating props#833
Flame119052 wants to merge 2 commits into
tscircuit:mainfrom
Flame119052:cursor/resistor-rating-props-73fd

Conversation

@Flame119052

Copy link
Copy Markdown

Summary

Resistor docs advertise powerRating and temperatureOperatingRange, but ResistorProps rejected both (tscircuit/core#3105). Transpiling builds then stripped them.

This adds those optional fields. powerRating accepts a number or string (0.25W). temperatureOperatingRange accepts a [min, max] tuple or a string range.

A broader stale-closed attempt (#801) also added extra ratings. This PR only covers the two props in the issue.

Test plan

  • bun test tests/resistor-ratings.test.ts tests/resistor.test.ts
  • bun run typecheck
  • regenerated component-types and README docs

Fixes tscircuit/core#3105

Docs advertise powerRating and temperatureOperatingRange. Both are
currently stripped (tscircuit/core#3105).
Add optional powerRating and temperatureOperatingRange so documented
resistor JSX typechecks instead of being stripped.
@github-actions

Copy link
Copy Markdown

This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

resistor: documented rating props are unsupported

2 participants