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.
22 lines
507 B
22 lines
507 B
import { injectable } from 'tsyringe'; |
|
import { Operation } from '../../shared/operations'; |
|
import MemoryStorage from '../infrastructures/MemoryStorage'; |
|
|
|
const REPEAT_KEY = 'repeat'; |
|
|
|
@injectable() |
|
export default class RepeatRepository { |
|
private cache: MemoryStorage; |
|
|
|
constructor() { |
|
this.cache = new MemoryStorage(); |
|
} |
|
|
|
getLastOperation(): Operation | undefined { |
|
return this.cache.get(REPEAT_KEY); |
|
} |
|
|
|
setLastOperation(op: Operation): void { |
|
this.cache.set(REPEAT_KEY, op); |
|
} |
|
}
|
|
|