-
Notifications
You must be signed in to change notification settings - Fork 763
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
Add resourceInput<>
and resourceOutput<>
utility types
#15825
Conversation
Test this change out locally with the following install scripts (Action run 12265885506) VSCode
Azure CLI
|
Dotnet Test Results 78 files - 39 78 suites - 39 32m 11s ⏱️ - 11m 25s Results for commit f26c38b. ± Comparison against base commit c5137bd. This pull request removes 1842 and adds 644 tests. Note that renamed tests count towards both.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolves #15183
This PR adds two new utility types (
resourceInput<>
andresourceOutput<>
) and deprecates the existingresource<>
utility types. These three utility types are all closely related but differ in which property flags they surface:resource<>
has the flags that were originally defined in the RP types artifact. This is generally not what people want.resourceInput<>
strips out allWriteOnly
flags. This means that template authors can access properties on aresourceInput<>
-typed parameter that would have previously raised a BCP077 diagnostic.resourceOutput<>
strips out allReadOnly
flags.Additionally, this PR allows the assignment of one
ReadOnly
property to anotherReadOnly
property without raising any BCP073 diagnostics.Microsoft Reviewers: Open in CodeFlow