Make find as a clean architecture

This commit is contained in:
Shin'ya Ueoka 2019-05-11 11:37:18 +09:00
parent bacf83a320
commit 1ba1660269
15 changed files with 424 additions and 182 deletions

View file

@ -0,0 +1,19 @@
export default interface FindRepository {
getLastKeyword(): string | null;
setLastKeyword(keyword: string): void;
// eslint-disable-next-line semi
}
let current: string | null = null;
export class FindRepositoryImpl implements FindRepository {
getLastKeyword(): string | null {
return current;
}
setLastKeyword(keyword: string): void {
current = keyword;
}
}

View file

@ -18,5 +18,4 @@ export class SettingRepositoryImpl implements SettingRepository {
get(): Settings {
return current;
}
}