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

Use imported type rather than narrowed type for union branches within resource declaration #8902

Merged
merged 1 commit into from
Nov 4, 2022

Conversation

jeskew
Copy link
Contributor

@jeskew jeskew commented Nov 4, 2022

Found another regression related to deep union inspection: when inside a resource declaration, this union type narrower was returning the narrowed type of what was assigned vs what was expected, which has the effect of dropping readonly properties (as these will be missing from what was assigned but will be populated by the RP).

Microsoft Reviewers: Open in CodeFlow

@jeskew jeskew marked this pull request as ready for review November 4, 2022 21:32
Copy link
Contributor

@shenglol shenglol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@jeskew jeskew enabled auto-merge (squash) November 4, 2022 21:55
@jeskew jeskew merged commit 79050f6 into main Nov 4, 2022
@jeskew jeskew deleted the jeskew/union-readonly-fixup branch November 4, 2022 21:59
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.

None yet

2 participants