diff options
Diffstat (limited to 'src/background/repositories/FindRepository.ts')
-rw-r--r-- | src/background/repositories/FindRepository.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/background/repositories/FindRepository.ts b/src/background/repositories/FindRepository.ts index 74ec914..bf286e6 100644 --- a/src/background/repositories/FindRepository.ts +++ b/src/background/repositories/FindRepository.ts @@ -3,15 +3,17 @@ import MemoryStorage from '../infrastructures/MemoryStorage'; const FIND_KEYWORD_KEY = 'find-keyword'; export default class FindRepository { + private cache: MemoryStorage; + constructor() { this.cache = new MemoryStorage(); } - getKeyword() { + getKeyword(): Promise<string> { return Promise.resolve(this.cache.get(FIND_KEYWORD_KEY)); } - setKeyword(keyword) { + setKeyword(keyword: string): Promise<any> { this.cache.set(FIND_KEYWORD_KEY, keyword); return Promise.resolve(); } |