tscircuit / props

Prop definitions for tscircuit components
1 stars 3 forks source link

Refactoring into many files (part 1), splitting props from zod and adding a typecheck to ensure parity #32

Closed seveibar closed 3 weeks ago

seveibar commented 3 weeks ago

The one-file project is getting a bit out of hand, so i've starting splitting things up

The reason we're defining props twice: It's often very hard to look at the types when you inspect them in React by Cmd+Clicking on the component. This is a pet peeve of mine with many compiled React projects. This will be an ongoing refactor. Ai is reasonably good at it

An alternative to this design is where we use zod-to-ts to generate the typescript from the zod types. But that can get extremely tricky and sometimes explode the types. Sometimes simpler is better