Add better event typing

The any types could probably be improved with $$Generic
This commit is contained in:
Ryan Gossiaux
2022-01-31 21:15:00 -08:00
parent dde8112ca7
commit bfc68577cc
5 changed files with 18 additions and 5 deletions

View File

@@ -80,7 +80,9 @@
horizontal ? "horizontal" : "vertical"
) as StateDefinition["orientation"];
const dispatch = createEventDispatcher();
const dispatch = createEventDispatcher<{
change: any;
}>();
let listboxState: StateDefinition["listboxState"] = ListboxStates.Closed;
let labelRef: StateDefinition["labelRef"] = writable(null);