diff options
author | Wolfgang Müller | 2024-03-31 13:29:38 +0200 |
---|---|---|
committer | Wolfgang Müller | 2024-03-31 13:29:38 +0200 |
commit | 8d4a02d18537b94f5ce1d2122c3e3128d9108c81 (patch) | |
tree | 0dc4201d52003b1893b5556e22c48ef897836bef /frontend/src/lib/components/Select.svelte | |
parent | 384b96e2b80081393b011c7509f2ab10413ea0f8 (diff) | |
download | hircine-8d4a02d18537b94f5ce1d2122c3e3128d9108c81.tar.gz |
frontend: Simplify types in Select.svelte
Use an intermediary Item type that we can put in a union.
Diffstat (limited to '')
-rw-r--r-- | frontend/src/lib/components/Select.svelte | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/frontend/src/lib/components/Select.svelte b/frontend/src/lib/components/Select.svelte index 413b50c..227959d 100644 --- a/frontend/src/lib/components/Select.svelte +++ b/frontend/src/lib/components/Select.svelte @@ -8,7 +8,8 @@ let valueAsObject = false; let multiple = false; - type Value = (number | string | ListItem)[] | number | string | ListItem | undefined | null; + type Item = number | string | ListItem; + type Value = Item | Item[] | undefined | null; export let clearable = false; export let placeholder = 'Select...'; |