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

@@ -17,7 +17,9 @@
export let as: SupportedAs = "button";
export let use: HTMLActionArray = [];
const dispatch = createEventDispatcher();
const dispatch = createEventDispatcher<{
change: boolean;
}>();
export let checked = false;
let api = useSwitchContext();
let labelContext = useLabelContext();