misc: update imports for types
This commit is contained in:
77 files changed
+88
-76
No files matched your search
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { locale } from '$lib/i18n/translations'
|
||||
import { getContext, type Snippet } from 'svelte'
|
||||
import { getContext, onDestroy, type Snippet } from 'svelte'
|
||||
import type { IconSource } from 'svelte-hero-icons'
|
||||
import type { HTMLOptionAttributes } from 'svelte/elements'
|
||||
|
||||
@@ -42,6 +42,13 @@
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
onDestroy(() => {
|
||||
const index = context.options.findIndex(i => i.value == option.value)
|
||||
if (index != -1) {
|
||||
context.options.splice(index, 1)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
{#key $locale}
|
||||
|
||||
Reference in new issue
Block a user