mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-06-11 08:50:17 +00:00
Refactor types in svelte components.
This commit is contained in:
@@ -10,29 +10,17 @@
|
||||
import InfoNote from "@/lib/src/UI/components/InfoNote.svelte";
|
||||
import ExtraItems from "@/lib/src/UI/components/ExtraItems.svelte";
|
||||
import Check from "@/lib/src/UI/components/Check.svelte";
|
||||
const TYPE_CANCEL = "cancelled";
|
||||
import {
|
||||
TYPE_CANCEL,
|
||||
TYPE_BACKUP_DONE,
|
||||
TYPE_BACKUP_SKIPPED,
|
||||
TYPE_UNABLE_TO_BACKUP,
|
||||
type RebuildEverythingResult,
|
||||
type ResultTypeBackup,
|
||||
} from "./setupDialogTypes";
|
||||
|
||||
const TYPE_BACKUP_DONE = "backup_done";
|
||||
const TYPE_BACKUP_SKIPPED = "backup_skipped";
|
||||
const TYPE_UNABLE_TO_BACKUP = "unable_to_backup";
|
||||
|
||||
type ResultTypeBackup =
|
||||
| typeof TYPE_BACKUP_DONE
|
||||
| typeof TYPE_BACKUP_SKIPPED
|
||||
| typeof TYPE_UNABLE_TO_BACKUP
|
||||
| typeof TYPE_CANCEL;
|
||||
|
||||
type ResultTypeExtra = {
|
||||
preventFetchingConfig: boolean;
|
||||
};
|
||||
type ResultType =
|
||||
| {
|
||||
backup: ResultTypeBackup;
|
||||
extra: ResultTypeExtra;
|
||||
}
|
||||
| typeof TYPE_CANCEL;
|
||||
type Props = {
|
||||
setResult: (result: ResultType) => void;
|
||||
setResult: (result: RebuildEverythingResult) => void;
|
||||
};
|
||||
const { setResult }: Props = $props();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user