Files
scriptc/tests/corpus/950-modules-basic/util.ts
2026-07-22 18:08:04 -05:00

19 lines
379 B
TypeScript

export const base: number = 10;
export let counter: number = 0;
export function bump(): number {
counter += 1;
return counter;
}
export class Tally {
total: number = 0;
label: string;
constructor(label: string) {
this.label = label;
}
add(n: number): string {
this.total += n;
return `${this.label}=${this.total}`;
}
}
console.log("util init", base);