Added settings observable
This commit is contained in:
@@ -70,6 +70,11 @@ const dispatchers = defineDispatchers({
|
|||||||
|
|
||||||
export const settingsStore = new DispatchingStore(defaultSettings, dispatchers)
|
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>(
|
export function getSettingSubject<K extends keyof SettingsType>(
|
||||||
settingKey: K
|
settingKey: K
|
||||||
): Observable<SettingsType[K]> {
|
): Observable<SettingsType[K]> {
|
||||||
|
|||||||
Reference in New Issue
Block a user