A fork of https://github.com/ueokande/vim-vixen
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
365 B
24 lines
365 B
6 years ago
|
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 = [];
|
||
|
}
|
||
|
}
|