Skip to content

Commit

Permalink
feat: [Ast].Types (Fixes #642)
Browse files Browse the repository at this point in the history
  • Loading branch information
James Brundage committed Nov 12, 2023
1 parent 345154b commit a54f53e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Types/AST/get_Types.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<#
.SYNOPSIS
Gets all Types within an AST
.DESCRIPTION
Gets all Types referenced within a PowerShell Abstract Syntax Tree
.EXAMPLE
{[int];[psobject];[xml]}.Ast.Types
#>

,@(foreach ($node in $this.ByType[[Management.Automation.Language.TypeExpressionAst]]) {
$node
})

0 comments on commit a54f53e

Please sign in to comment.