Skip to content

Handle types in first and last functions#9533

Merged
jeskew merged 12 commits intoAzure:mainfrom
levimatheri:fix/issue-9471-first-function-dot-notation
Jan 23, 2023
Merged

Handle types in first and last functions#9533
jeskew merged 12 commits intoAzure:mainfrom
levimatheri:fix/issue-9471-first-function-dot-notation

Conversation

@levimatheri
Copy link
Copy Markdown
Contributor

@levimatheri levimatheri commented Jan 15, 2023

Fixes #9471.
FYI @jeskew

Microsoft Reviewers: Open in CodeFlow

Copy link
Copy Markdown
Contributor

@jeskew jeskew left a comment

Choose a reason for hiding this comment

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

Thanks for taking this on, @levimatheri (and for adding last to the mix as well)!

I had a couple comments stemming from the TupleType changes that are in main but have not yet been included in a release.

@jeskew jeskew self-assigned this Jan 17, 2023
Copy link
Copy Markdown
Contributor

@jeskew jeskew left a comment

Choose a reason for hiding this comment

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

The test failures look like type errors caused by first and last no longer using a return type of any. All the ones I saw could be fixed by the ! operator added in #9585 (e.g., change first(first(privateEndpoint.properties.customDnsConfigs).ipAddresses) to first(first(privateEndpoint.properties.customDnsConfigs)!.ipAddresses)! on this line). If that doesn't work in any cases, you can use the any function.

Once those are fixed, this PR will be good to merge.

Copy link
Copy Markdown
Contributor

@jeskew jeskew 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 merged commit 885fa39 into Azure:main Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

VSCode Intellisense doesn't show custom type properties via dot notation after first function

2 participants