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

Optional props cannot be assigned to required ones #3290

Merged

Conversation

timotheeguerin
Copy link
Member

@timotheeguerin timotheeguerin commented May 6, 2024

fix #3267

@azure-sdk
Copy link
Collaborator

azure-sdk commented May 6, 2024

All changed packages have been documented.

  • @typespec/compiler
Show changes

@typespec/compiler - fix ✏️

Model with an optional property should not be satisfy a constraint with that property required. ({foo?: string} cannot be assigned to a constraint of {foo: string})

Co-authored-by: Brian Terlson <brian.terlson@microsoft.com>
@azure-sdk
Copy link
Collaborator

You can try these changes at https://cadlplayground.z22.web.core.windows.net/prs/3290/

Check the website changes at https://tspwebsitepr.z22.web.core.windows.net/prs/3290/

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

Successfully merging this pull request may close these issues.

Optional properties are assignable to required propeties
3 participants