Intellisense not working when more than one DynamicParameter is used
See original GitHub issueVersion: 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.
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
C# intellisense incorrect for method that takes a dynamic ...
I can't use intellisense any more on b until I do a dummy recast (int)SomeType.Fn(value) for what was already prototype to return an...
Read more >IntelliSense in Visual Studio Code
IntelliSense. IntelliSense is a general term for various code editing features including: code completion, parameter info, quick info, and member lists.
Read more >Identify issues with IntelliSense (SSMS) - SQL Server
Parameter help does not support the parameters in some objects, such as extended stored procedures. For more information, see Transact-SQL ...
Read more >Dynamic behavior in Svelte: working with variables and props
To prove it, go to that array, and try changing some of the to-do object's completed property values, and even add a new...
Read more >Place Autocomplete | Places API - Google Developers
Each session can have multiple queries, followed by one place selection. The API key(s) used for each request within a session must belong...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@DarkLite1 based on your response, I suspect you’re hitting https://github.com/PowerShell/PowerShellEditorServices/issues/762#issuecomment-428756484. @SeeminglyScience might have some insight there.
This is something we don’t have much control over; the fix lies in PackageManagement, but we’re investigating how to fix it since it also affects PSScriptAnalyzer
Bot is trigger happy…