Skip to content

Commit 718b735

Browse files
StartAutomatingStartAutomating
authored andcommitted
Adding Define (Fixes #299)
1 parent 959c92f commit 718b735

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Transpilers/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ This directory includes uncategorized or 'common' transpilers.
1212
|DisplayName |Synopsis |
1313
|----------------------------------------|---------------------------------------------------------------------|
1414
|[Decorate](Decorate.psx.ps1) |[decorate transpiler](Decorate.psx.ps1) |
15+
|[Define](Define.psx.ps1) |[defines a variable](Define.psx.ps1) |
1516
|[Explicit](Explicit.psx.ps1) |[Makes Output from a PowerShell function Explicit.](Explicit.psx.ps1)|
1617
|[Help](Help.psx.ps1) |[Help Transpiler](Help.psx.ps1) |
1718
|[Include](Include.psx.ps1) |[Includes Files](Include.psx.ps1) |
@@ -35,6 +36,24 @@ This directory includes uncategorized or 'common' transpilers.
3536
}.Transpile()
3637
~~~
3738

39+
#### Define Example 1
40+
41+
42+
~~~PowerShell
43+
{
44+
[Define(Value={Get-Random})]$RandomNumber
45+
}.Transpile()
46+
~~~
47+
48+
#### Define Example 2
49+
50+
51+
~~~PowerShell
52+
{
53+
[Define(Value={$global:ThisValueExistsAtBuildTime})]$MyVariable
54+
}.Transpile()
55+
~~~
56+
3857
#### Explicit Example 1
3958

4059

0 commit comments

Comments
 (0)