using namespace System.Management.Automation.Language
$RootAst = [Parser]::ParseInput('[System.Collections.Generic.List[string]]', [ref]$null, [ref]$null)
$TypeAst = $RootAst.Find({param($ast) $ast -is [TypeExpressionAst]}, $true)
$TypeAst.TypeName.TypeName.GetReflectionType()
The following output every time:
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True List`1 System.Object
The previously shown output once per session.
Name Value
---- -----
PSVersion 7.6.0-preview.2
PSEdition Core
GitCommitId 7.6.0-preview.2
OS Microsoft Windows 10.0.19045
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Prerequisites
Steps to reproduce
Snippet:
Expected behavior
Actual behavior
The previously shown output once per session.Error details
Environment data
Visuals
No response