//In TypeScript there are no
//structures with type members
class Setting {
//type field
static mode: number
//type method
static setNextMode() {
Setting.mode = (Setting.mode + 1) % 3
}
}
Setting.mode = 3
Setting.setNextMode()
//Setting.mode is 1
console.log("mode is", Setting.mode)