mirror of
https://github.com/voltrevo/ValueScript.git
synced 2026-01-12 23:18:03 -05:00
17 lines
229 B
TypeScript
17 lines
229 B
TypeScript
// test_output! [1,2,3]
|
|
|
|
export default function main() {
|
|
let c = Counter();
|
|
|
|
return [c.get(), c.get(), c.get()];
|
|
}
|
|
|
|
function Counter() {
|
|
return {
|
|
next: 1,
|
|
get: function () {
|
|
return this.next++;
|
|
},
|
|
};
|
|
}
|