Move to using writable<T> syntax

This commit is contained in:
Ryan Gossiaux
2022-02-17 16:42:19 -08:00
parent 87360c0196
commit 3c9dcc9b67
15 changed files with 21 additions and 25 deletions

View File

@@ -1,6 +1,5 @@
<script lang="ts">
import { onMount, setContext } from "svelte";
import type { Writable } from "svelte/store";
import { writable } from "svelte/store";
import { match } from "$lib/utils/match";
import { State, useOpenClosed } from "$lib/internal/open-closed";
@@ -69,14 +68,14 @@
}
let state = shouldShow ? TreeStates.Visible : TreeStates.Hidden;
let nestingBag: Writable<NestingContextValues> = writable(
let nestingBag = writable<NestingContextValues>(
useNesting(() => {
state = TreeStates.Hidden;
})
);
let initial = true;
let transitionBag: Writable<TransitionContextValues> = writable();
let transitionBag = writable<TransitionContextValues>();
$: transitionBag.set({
show: !!shouldShow,
appear: appear || !initial,