mirror of
https://github.com/koloml/furbooru-tagging-assistant.git
synced 2025-12-24 07:12:57 +00:00
Adding type for suggestion position, converting store to TS
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import CacheableSettings from "$lib/extension/base/CacheableSettings";
|
||||
|
||||
export type SuggestionsPosition = "start" | "end";
|
||||
|
||||
interface SearchSettingsFields {
|
||||
suggestProperties: boolean;
|
||||
suggestPropertiesPosition: "start" | "end";
|
||||
suggestPropertiesPosition: SuggestionsPosition;
|
||||
}
|
||||
|
||||
export default class SearchSettings extends CacheableSettings<SearchSettingsFields> {
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { writable } from "svelte/store";
|
||||
import SearchSettings from "$lib/extension/settings/SearchSettings";
|
||||
import { type Writable, writable } from "svelte/store";
|
||||
import SearchSettings, { type SuggestionsPosition } from "$lib/extension/settings/SearchSettings";
|
||||
|
||||
export const searchPropertiesSuggestionsEnabled = writable(false);
|
||||
|
||||
/** @type {import('svelte/store').Writable<"start"|"end">} */
|
||||
export const searchPropertiesSuggestionsPosition = writable('start');
|
||||
export const searchPropertiesSuggestionsPosition: Writable<SuggestionsPosition> = writable('start');
|
||||
|
||||
const searchSettings = new SearchSettings();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user