-
Notifications
You must be signed in to change notification settings - Fork 12.8k
never
properties should not require the properties to be present
#43954
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
Comments
Well, it's not a bug... that's how object types and If you want to be able to leave out a property, then you need to make that property optional (here's that "optional" concept). So my suggestion would be to use something like I can imagine changing this into a suggestion that properties of type |
A type with a property of type |
Okay, that sounds. Note that the suggested type Thank you all! I'd open a suggestion anew in case the PR was declined. |
Bug Report
π Search Terms
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
never
properties require initialization for those impossible propertiesπ Expected behavior
never
properties should disallow any initializationI see there existed a similar issue #16762, but I think this bug is not related to "optional" concept. I believe the current behavior is definitely weird.
The text was updated successfully, but these errors were encountered: