Skip to content

Commit d3953db

Browse files
StartAutomatingStartAutomating
authored andcommitted
feat: Namespace.get_PSType ( Fixes #1142 )
1 parent 148420e commit d3953db

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

PipeScript.types.ps1xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2803,6 +2803,27 @@ if ($value -isnot [regex]) {
28032803
$this.psobject.properties.add([psnoteproperty]::new('.Pattern',$value), $true)
28042804
</SetScriptBlock>
28052805
</ScriptProperty>
2806+
<ScriptProperty>
2807+
<Name>PSType</Name>
2808+
<GetScriptBlock>
2809+
&lt;#
2810+
.SYNOPSIS
2811+
Gets the pstypes in the namespace.
2812+
.DESCRIPTION
2813+
Gets all the pstypes in the namespace.
2814+
2815+
This is, gets all extended type information in the namespace.
2816+
#&gt;
2817+
if (-not $this.Pattern) { return }
2818+
2819+
foreach ($typeData in Get-TypeData) {
2820+
if ($typeData.TypeName -match $this.Pattern) {
2821+
$typeData
2822+
}
2823+
}
2824+
2825+
</GetScriptBlock>
2826+
</ScriptProperty>
28062827
</Members>
28072828
</Type>
28082829
<Type>

0 commit comments

Comments
 (0)