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

@@ -70,7 +70,9 @@
export let open: Boolean | undefined = undefined;
export let initialFocus: HTMLElement | null = null;
const dispatch = createEventDispatcher();
const dispatch = createEventDispatcher<{
close: boolean;
}>();
let containers: Set<HTMLElement> = new Set();
let openClosedState = useOpenClosed();