// Auto-generated by speckl-compile from ToggleSwitch // DO NOT EDIT MANUALLY — regenerate from .speckdl source export const ToggleSwitchState = { Open: 'open', Closed: 'closed', } as const; export type ToggleSwitchState = typeof ToggleSwitchState[keyof typeof ToggleSwitchState]; export class ToggleSwitchMachine { isOn: boolean; decisionLog: any[] = []; constructor() { // No init block defined } TurnOn() { if (!(not this.isOn)) throw new Error('Guard failed: not this.isOn'); this.isOn = true; } TurnOff() { if (!(this.isOn)) throw new Error('Guard failed: this.isOn'); this.isOn = false; } }