Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript errors for optional nested fields #267

Open
ngryman opened this issue Nov 26, 2024 · 2 comments
Open

Typescript errors for optional nested fields #267

ngryman opened this issue Nov 26, 2024 · 2 comments
Assignees

Comments

@ngryman
Copy link

ngryman commented Nov 26, 2024

Hey,

First of all, thank you for your amazing work. This library and valibot are very well designed libraries that I really enjoy using. Thanks!

Probably related to #144 and #173, I have Typescript errors when using optional nested fields.

You can find a reproduction here.

You should be able to see the errors I'm talking about in automation.tsx:

  1. The Field type is inferred to undefined for a nested field.
  2. The setValue value argument is never.

If you remove the optional suffix for schedule, everything works as expected.

This is not a blocking issue obviously but it messes up with the great DX of this library.

@fabian-hiller
Copy link
Owner

Hey, sorry for the late reply. I am very busy with other things at the moment and am not able to look at it. I am very sorry for that. I hope to find some time towards the end of the year.

@fabian-hiller fabian-hiller self-assigned this Dec 5, 2024
@fabian-hiller
Copy link
Owner

Were you able to resolve the issue in the meantime? If not, I can try to look into it by the end of the year.

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

No branches or pull requests

2 participants