aboutsummaryrefslogtreecommitdiff
path: root/src/content/repositories/FollowSlaveRepository.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/repositories/FollowSlaveRepository.ts')
-rw-r--r--src/content/repositories/FollowSlaveRepository.ts31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/content/repositories/FollowSlaveRepository.ts b/src/content/repositories/FollowSlaveRepository.ts
new file mode 100644
index 0000000..4c2de72
--- /dev/null
+++ b/src/content/repositories/FollowSlaveRepository.ts
@@ -0,0 +1,31 @@
+export default interface FollowSlaveRepository {
+ enableFollowMode(): void;
+
+ disableFollowMode(): void;
+
+ isFollowMode(): boolean;
+
+ // eslint-disable-next-line semi
+}
+
+const current: {
+ enabled: boolean;
+} = {
+ enabled: false,
+};
+
+export class FollowSlaveRepositoryImpl implements FollowSlaveRepository {
+ enableFollowMode(): void {
+ current.enabled = true;
+ }
+
+ disableFollowMode(): void {
+ current.enabled = false;
+ }
+
+ isFollowMode(): boolean {
+ return current.enabled;
+ }
+}
+
+