Open
Description
Version: 1.37.0-insider (user setup)
Commit: 92da68a71cfb60bd3b9b0d7fbfb2a7e1fff9dbaf
Date: 2019-08-01T05:37:54.848Z
Electron: 4.2.7
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 6.2.9200
Steps to Reproduce:
Consider the following example function:
Function Test-Stuff {
Param (
[Parameter(Mandatory, ValueFromPipeline)]
[Object[]]$Ticket,
[Switch]$PassThru
)
DynamicParam {
$DynamicParameters = @(
@{
Name = 'Environment'
Type = [Array]
Position = 0
Mandatory = $true
ValidateSet = @('Test', 'Prod', 'Stage', 'Dev')
}
,
@{
Name = 'Type'
Type = [Array]
Position = 0
Mandatory = $true
ValidateSet = @('Incident', 'Request', 'Project')
}
)
$DynamicParameters | ForEach-Object { New-Object PSObject -Property $_ } | New-DynamicParameter
}
Begin {
New-DynamicParameter -CreateVariables -BoundParameters $PSBoundParameters
}
Process {
'yes'
}
}
The function `New-DynamicParamter' can be downloaded here.
- When using intellisense in the editor pane it keeps on loading and nothing is suggested for the second/last dynamic parameter (in this example
-Type
)
- Observe that the same function with intellisense works fine in the
Terminal
or in the editor of thePowerShell ISE
.
I was going nuts about this, because I thought my code was broken. Seems after a bit of stressing it's a bug in the editor pane. Thank you for looking at this.