Chore: Improve typing

This commit is contained in:
Pieter Vander Vennet 2023-12-07 21:55:54 +01:00
parent d62c56bbe1
commit f77a06f317

View file

@ -1,11 +1,11 @@
<script lang="ts"> <script lang="ts">
import { UIEventSource } from "../../Logic/UIEventSource" import { Store } from "../../Logic/UIEventSource";
import { onDestroy } from "svelte" import { onDestroy } from "svelte"
/** /**
* For some stupid reason, it is very hard to let {#if} work together with UIEventSources, so we wrap then here * For some stupid reason, it is very hard to let {#if} work together with UIEventSources, so we wrap then here
*/ */
export let condition: UIEventSource<boolean> export let condition: Store<boolean>
let _c = condition.data let _c = condition.data
onDestroy( onDestroy(
condition.addCallback((c) => { condition.addCallback((c) => {