aboutsummaryrefslogtreecommitdiff
path: root/src/content/repositories/MarkKeyRepository.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/repositories/MarkKeyRepository.ts')
-rw-r--r--src/content/repositories/MarkKeyRepository.ts52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/content/repositories/MarkKeyRepository.ts b/src/content/repositories/MarkKeyRepository.ts
new file mode 100644
index 0000000..c24548a
--- /dev/null
+++ b/src/content/repositories/MarkKeyRepository.ts
@@ -0,0 +1,52 @@
+export default interface MarkKeyRepository {
+ isSetMode(): boolean;
+
+ enableSetMode(): void;
+
+ disabeSetMode(): void;
+
+ isJumpMode(): boolean;
+
+ enableJumpMode(): void;
+
+ disabeJumpMode(): void;
+
+ // eslint-disable-next-line semi
+}
+
+interface Mode {
+ setMode: boolean;
+ jumpMode: boolean;
+}
+
+let current: Mode = {
+ setMode: false,
+ jumpMode: false,
+};
+
+export class MarkKeyRepositoryImpl implements MarkKeyRepository {
+
+ isSetMode(): boolean {
+ return current.setMode;
+ }
+
+ enableSetMode(): void {
+ current.setMode = true;
+ }
+
+ disabeSetMode(): void {
+ current.setMode = false;
+ }
+
+ isJumpMode(): boolean {
+ return current.jumpMode;
+ }
+
+ enableJumpMode(): void {
+ current.jumpMode = true;
+ }
+
+ disabeJumpMode(): void {
+ current.jumpMode = false;
+ }
+}