Skip to content

Commit 94a5730

Browse files
authored
Update switchmanager.ts with Imports
Import for `./classes/SwitchContext` added.
1 parent 2f0633f commit 94a5730

1 file changed

Lines changed: 19 additions & 18 deletions

File tree

‎classes/switchmanager.ts‎

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
namespace switchblock {
2-
class SwitchManager {
3-
private switches: { [name: string]: SwitchContext } = {};
4-
5-
create(name: string): SwitchContext {
6-
const ctx = new SwitchContext();
7-
this.switches[name] = ctx;
8-
return ctx;
9-
}
10-
11-
get(name: string): SwitchContext {
12-
return this.switches[name];
13-
}
14-
15-
debug(name: string): void {
16-
const ctx = this.switches[name];
17-
console.log(`Switch "${name}" has ${ctx.caseCount()} cases`);
18-
}
1+
import {SwitchContext} from 'SwitchContext'
2+
3+
class SwitchManager {
4+
private switches: { [name: string]: SwitchContext } = {};
5+
6+
create(name: string): SwitchContext {
7+
const ctx = new SwitchContext();
8+
this.switches[name] = ctx;
9+
return ctx;
10+
}
11+
12+
get(name: string): SwitchContext {
13+
return this.switches[name];
14+
}
15+
16+
debug(name: string): void {
17+
const ctx = this.switches[name];
18+
console.log(`Switch "${name}" has ${ctx.caseCount()} cases`);
1919
}
2020
}
21+

0 commit comments

Comments
 (0)