mirror of
https://github.com/voltrevo/ValueScript.git
synced 2026-01-15 00:18:06 -05:00
21 lines
273 B
TypeScript
21 lines
273 B
TypeScript
//! test_output(4)
|
|
|
|
export default function main() {
|
|
let counter = new Counter();
|
|
|
|
(counter).inc();
|
|
(<Counter> counter).inc();
|
|
counter!.inc();
|
|
(counter as Counter).inc();
|
|
|
|
return counter.value;
|
|
}
|
|
|
|
class Counter {
|
|
value = 0;
|
|
|
|
inc() {
|
|
this.value++;
|
|
}
|
|
}
|