aboutsummaryrefslogtreecommitdiff
path: root/src/content/repositories
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/repositories')
-rw-r--r--src/content/repositories/KeymapRepository.ts23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/content/repositories/KeymapRepository.ts b/src/content/repositories/KeymapRepository.ts
new file mode 100644
index 0000000..081cc54
--- /dev/null
+++ b/src/content/repositories/KeymapRepository.ts
@@ -0,0 +1,23 @@
+import { Key } from '../../shared/utils/keys';
+
+export default interface KeymapRepository {
+ enqueueKey(key: Key): Key[];
+
+ clear(): void;
+
+ // eslint-disable-next-line semi
+}
+
+let current: Key[] = [];
+
+export class KeymapRepositoryImpl {
+
+ enqueueKey(key: Key): Key[] {
+ current.push(key);
+ return current;
+ }
+
+ clear(): void {
+ current = [];
+ }
+}