Files
ValueScript/inputs/passing/counter.ts
Andrew Morris bc1afa24c4 Add more tests
2023-02-28 15:28:06 +11:00

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++;
},
};
}