File tree Expand file tree Collapse file tree 1 file changed +97
-2
lines changed
Expand file tree Collapse file tree 1 file changed +97
-2
lines changed Original file line number Diff line number Diff line change 1- Decorate.psx.ps1 [ -TypeName] <string[ ] > [ -PassThru] [ -Clear] [ <CommonParameters >]
2- Decorate.psx.ps1 [ -TypeName] <string[ ] > -VariableAst <VariableExpressionAst > [ -PassThru] [ -Clear] [ <CommonParameters >]
1+
2+ Decorate
3+ --------
4+ ### Synopsis
5+ decorate transpiler
6+
7+ ---
8+ ### Description
9+
10+ Applies one or more typenames to an object.
11+ By 'decorating' the object with a typename, this enables use of the extended type system.
12+
13+ ---
14+ ### Examples
15+ #### EXAMPLE 1
16+ ``` PowerShell
17+ {
18+ $v = [PSCustomObject]@{}
19+ [decorate('MyTypeName',Clear,PassThru)]$v
20+ }.Transpile()
21+ ```
22+
23+ ---
24+ ### Parameters
25+ #### ** VariableAst**
26+
27+ The variable decoration will be applied to.
28+
29+
30+
31+ > ** Type** : ``` [VariableExpressionAst] ```
32+
33+ > ** Required** : true
34+
35+ > ** Position** : named
36+
37+ > ** PipelineInput** : true (ByValue)
38+
39+
40+
41+ ---
42+ #### ** TypeName**
43+
44+ The TypeName(s) used to decorate the object.
45+
46+
47+
48+ > ** Type** : ``` [String[]] ```
49+
50+ > ** Required** : true
51+
52+ > ** Position** : 1
53+
54+ > ** PipelineInput** : false
55+
56+
57+
58+ ---
59+ #### ** PassThru**
60+
61+ If set, will output the object after it has been decorated
62+
63+
64+
65+ > ** Type** : ``` [Switch] ```
66+
67+ > ** Required** : false
68+
69+ > ** Position** : named
70+
71+ > ** PipelineInput** : false
72+
73+
74+
75+ ---
76+ #### ** Clear**
77+
78+ If set, will clear any underlying typenames.
79+
80+
81+
82+ > ** Type** : ``` [Switch] ```
83+
84+ > ** Required** : false
85+
86+ > ** Position** : named
87+
88+ > ** PipelineInput** : false
89+
90+
91+
92+ ---
93+ ### Syntax
94+ ``` PowerShell
95+ Decorate -VariableAst <VariableExpressionAst> [-TypeName] <String[]> [-PassThru] [-Clear] [<CommonParameters>]
96+ ```
97+ ---
398
499
5100
You can’t perform that action at this time.
0 commit comments