Added settings observable

This commit is contained in:
Andrew Bastin
2021-06-16 22:35:53 -04:00
parent 4ce7f0b487
commit 02d3b45efc

View File

@@ -70,6 +70,11 @@ const dispatchers = defineDispatchers({
export const settingsStore = new DispatchingStore(defaultSettings, dispatchers)
/**
* An observable value to make avail all the state information at once
*/
export const settings$ = settingsStore.subject$.asObservable()
export function getSettingSubject<K extends keyof SettingsType>(
settingKey: K
): Observable<SettingsType[K]> {