We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
TransitionMap
1 parent 7bbf198 commit db9d8abCopy full SHA for db9d8ab
1 file changed
src/timer.cubing.net/timing/Controller.ts
@@ -12,7 +12,7 @@ enum State {
12
Ignore = "ignore",
13
}
14
15
-type TransitionMap = Partial<Record<State, State>>;
+type TransitionMap = Record<State, State>;
16
17
export class Controller {
18
private timer: Timer;
@@ -81,6 +81,7 @@ export class Controller {
81
[State.Running]: State.Stopped,
82
[State.Stopped]: State.Ignore,
83
[State.Done]: State.ReadyDown,
84
+ [State.Ignore]: State.Ignore,
85
};
86
this.setState(transitionMap[this.state]);
87
@@ -93,6 +94,7 @@ export class Controller {
93
94
[State.Running]: State.Ignore,
95
[State.Stopped]: State.Done,
96
[State.Done]: State.Ignore,
97
98
99
100
0 commit comments