PowerShell / PowerShell

PowerShell for every system!
https://microsoft.com/PowerShell
MIT License
43.55k stars 7.06k forks source link

When generating `OutputType` don't cast to `Type[]` #21605

Closed SeeminglyScience closed 1 week ago

SeeminglyScience commented 2 weeks ago

This fixes an issue with constrained language mode where modules that specify multiple OutputType's as System.Type would throw due to Type[] not being a "core type".

An example of a command shipped with Windows that would previously throw is Get-DeliveryOptimizationStatus from the DeliveryOptimization module.

PR Summary

PR Context

PR Checklist

microsoft-github-policy-service[bot] commented 1 week ago

📣 Hey @SeeminglyScience, how did we do? We would love to hear your feedback with the link below! 🗣️

🔗 https://aka.ms/PSRepoFeedback

Microsoft Forms