File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
tests/HydraScript.IntegrationTests Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 2929 <None Update =" Samples\ceil.js" >
3030 <CopyToOutputDirectory >Always</CopyToOutputDirectory >
3131 </None >
32+ <None Update =" Samples\counter.js" >
33+ <CopyToOutputDirectory >Always</CopyToOutputDirectory >
34+ </None >
3235 <None Update =" Samples\cycled.js" >
3336 <CopyToOutputDirectory >Always</CopyToOutputDirectory >
3437 </None >
Original file line number Diff line number Diff line change 1+ type Counter = {
2+ state :number ;
3+ }
4+
5+ function next ( counter : Counter , step = 1 ) {
6+ counter . state = counter . state + step
7+ return counter . state
8+ }
9+
10+ function newCounter ( start : number ) :Counter {
11+ return { state : start ; }
12+ }
13+
14+ let counter = newCounter ( 4 )
15+ >>> counter . next ( )
16+ >>> counter . next ( 2 )
You can’t perform that action at this time.
0 commit comments