diff options
Diffstat (limited to 'src/content/repositories/SettingRepository.ts')
-rw-r--r-- | src/content/repositories/SettingRepository.ts | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/content/repositories/SettingRepository.ts b/src/content/repositories/SettingRepository.ts new file mode 100644 index 0000000..711b2a2 --- /dev/null +++ b/src/content/repositories/SettingRepository.ts @@ -0,0 +1,21 @@ +import Settings, { DefaultSetting } from '../../shared/Settings'; + +let current: Settings = DefaultSetting; + +export default interface SettingRepository { + set(setting: Settings): void; + + get(): Settings; + + // eslint-disable-next-line semi +} + +export class SettingRepositoryImpl implements SettingRepository { + set(setting: Settings): void { + current = setting; + } + + get(): Settings { + return current; + } +} |