-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Optional properties that are not set on nested objects cause errors #5759
Comments
It seems that it's possible to avoid this error if you avoid interfaces: try |
Alternatively, you could create a type for |
@idiostruct In this case the nested doesn't really make sense to have a type @apsavin Thanks for letting me know I can use types, that workaround works for me. However, it still looks like this is a bug. |
@TrySound thanks for the smaller piece of code... the original codebase I was having this in was several thousand lines and took me almost 20 minutes to get it down to my original example... I'm glad you could distil it further 😄 |
I believe this is the same problem with nested properties: |
Still an issue in v0.67.0 |
Still an issue in v0.70.0 |
Reproducible on the flow try thingy... Just copy and paste the code above.
This works fine in TypeScript.
The text was updated successfully, but these errors were encountered: