Skip to content

@advjs/monorepo / client / useSettingsStore

Function: useSettingsStore()

useSettingsStore(pinia?, hot?): Store<"settings", Pick<{ resetSettings: () => void; speech: { error: Ref<undefined | SpeechSynthesisErrorEvent, undefined | SpeechSynthesisErrorEvent>; isPlaying: Ref<boolean, boolean>; isSupported: ComputedRef<boolean>; speak: () => void; status: Ref<UseSpeechSynthesisStatus, UseSpeechSynthesisStatus>; stop: () => void; toggle: (value?) => void; utterance: ComputedRef<SpeechSynthesisUtterance>; }; speechContent: Ref<string, string>; storage: RemovableRef<SettingOptions>; toggleFullScreen: () => Promise<void>; }, "speech" | "storage" | "speechContent">, Pick<{ resetSettings: () => void; speech: { error: Ref<undefined | SpeechSynthesisErrorEvent, undefined | SpeechSynthesisErrorEvent>; isPlaying: Ref<boolean, boolean>; isSupported: ComputedRef<boolean>; speak: () => void; status: Ref<UseSpeechSynthesisStatus, UseSpeechSynthesisStatus>; stop: () => void; toggle: (value?) => void; utterance: ComputedRef<SpeechSynthesisUtterance>; }; speechContent: Ref<string, string>; storage: RemovableRef<SettingOptions>; toggleFullScreen: () => Promise<void>; }, never>, Pick<{ resetSettings: () => void; speech: { error: Ref<undefined | SpeechSynthesisErrorEvent, undefined | SpeechSynthesisErrorEvent>; isPlaying: Ref<boolean, boolean>; isSupported: ComputedRef<boolean>; speak: () => void; status: Ref<UseSpeechSynthesisStatus, UseSpeechSynthesisStatus>; stop: () => void; toggle: (value?) => void; utterance: ComputedRef<SpeechSynthesisUtterance>; }; speechContent: Ref<string, string>; storage: RemovableRef<SettingOptions>; toggleFullScreen: () => Promise<void>; }, "resetSettings" | "toggleFullScreen">>

Defined in: packages/client/stores/settings/index.ts:10

Returns a store, creates it if necessary.

Parameters

pinia?

Pinia instance to retrieve the store

null | Pinia

hot?

StoreGeneric

dev only hot module replacement

Returns

Store<"settings", Pick<{ resetSettings: () => void; speech: { error: Ref<undefined | SpeechSynthesisErrorEvent, undefined | SpeechSynthesisErrorEvent>; isPlaying: Ref<boolean, boolean>; isSupported: ComputedRef<boolean>; speak: () => void; status: Ref<UseSpeechSynthesisStatus, UseSpeechSynthesisStatus>; stop: () => void; toggle: (value?) => void; utterance: ComputedRef<SpeechSynthesisUtterance>; }; speechContent: Ref<string, string>; storage: RemovableRef<SettingOptions>; toggleFullScreen: () => Promise<void>; }, "speech" | "storage" | "speechContent">, Pick<{ resetSettings: () => void; speech: { error: Ref<undefined | SpeechSynthesisErrorEvent, undefined | SpeechSynthesisErrorEvent>; isPlaying: Ref<boolean, boolean>; isSupported: ComputedRef<boolean>; speak: () => void; status: Ref<UseSpeechSynthesisStatus, UseSpeechSynthesisStatus>; stop: () => void; toggle: (value?) => void; utterance: ComputedRef<SpeechSynthesisUtterance>; }; speechContent: Ref<string, string>; storage: RemovableRef<SettingOptions>; toggleFullScreen: () => Promise<void>; }, never>, Pick<{ resetSettings: () => void; speech: { error: Ref<undefined | SpeechSynthesisErrorEvent, undefined | SpeechSynthesisErrorEvent>; isPlaying: Ref<boolean, boolean>; isSupported: ComputedRef<boolean>; speak: () => void; status: Ref<UseSpeechSynthesisStatus, UseSpeechSynthesisStatus>; stop: () => void; toggle: (value?) => void; utterance: ComputedRef<SpeechSynthesisUtterance>; }; speechContent: Ref<string, string>; storage: RemovableRef<SettingOptions>; toggleFullScreen: () => Promise<void>; }, "resetSettings" | "toggleFullScreen">>