Replies: 1 comment
-
We'll be sure to look into this much later. Also open to contributions for this one. Let's consider solving this by separating the inputProps and outputProps in the schema. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
🐛 Bug report
It seems that all properties in useMachine input are typed as optional, even if they are required in the documentation and in practice. This causes code that typechecks to fail in runtime.
💥 Steps to reproduce
panels
inputtsc -b
[zag-js] missing required props: panels
💻 Link to reproduction
https://stackblitz.com/edit/sb1-3xdwzhmb?file=src%2FApp.tsx
🧐 Expected behavior
Since panels are a required property I would expect this to fail type checking.
🧭 Possible Solution
It seems that the input is partial'd on purpose, see
zag/packages/frameworks/solid/src/machine.ts
Line 22 in 4899e1d
I'm not sure why that is, but maybe it's possible to remove that and do something else instead.
🌍 System information
📝 Additional information
Beta Was this translation helpful? Give feedback.
All reactions