-
Notifications
You must be signed in to change notification settings - Fork 243
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
[core] Disallow overriding a required property with an optional property #3659
[core] Disallow overriding a required property with an optional property #3659
Conversation
All changed packages have been documented.
Show changes
|
You can try these changes at https://cadlplayground.z22.web.core.windows.net/prs/3659/ Check the website changes at https://tspwebsitepr.z22.web.core.windows.net/prs/3659/ |
…e-required-as-optional
Merging and will keep an eye on typespec-next to validate that there are no spec errors. |
Closes #3539
This change disallows overriding a required inherited property with an optional property.
This error does not take precedence over regular property assignability rules. In case the property both is optional when the overridden property is required and has a non-assignable type, both errors will be reported.