aboutsummaryrefslogtreecommitdiff
path: root/src/content/repositories
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-05-18 21:43:56 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2019-05-18 21:43:56 +0900
commita5518dce3d101cb1cb65724b82079f66f20c80c8 (patch)
tree79537b86e4a7bf231e8801c9c6bf2aeb94450343 /src/content/repositories
parent2ec912c262b51fe9523ebf74d5062d0b9bbdab71 (diff)
Define Key and KeySequence
Diffstat (limited to 'src/content/repositories')
-rw-r--r--src/content/repositories/KeymapRepository.ts11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/content/repositories/KeymapRepository.ts b/src/content/repositories/KeymapRepository.ts
index 081cc54..770ba0b 100644
--- a/src/content/repositories/KeymapRepository.ts
+++ b/src/content/repositories/KeymapRepository.ts
@@ -1,23 +1,24 @@
-import { Key } from '../../shared/utils/keys';
+import Key from '../domains/Key';
+import KeySequence from '../domains/KeySequence';
export default interface KeymapRepository {
- enqueueKey(key: Key): Key[];
+ enqueueKey(key: Key): KeySequence;
clear(): void;
// eslint-disable-next-line semi
}
-let current: Key[] = [];
+let current: KeySequence = KeySequence.from([]);
export class KeymapRepositoryImpl {
- enqueueKey(key: Key): Key[] {
+ enqueueKey(key: Key): KeySequence {
current.push(key);
return current;
}
clear(): void {
- current = [];
+ current = KeySequence.from([]);
}
}