From c12704c3014f71741aa707700c32a42df699f8e6 Mon Sep 17 00:00:00 2001 From: Simon H <5968653+dummdidumm@users.noreply.github.com> Date: Wed, 28 Sep 2022 16:51:45 +0200 Subject: [PATCH] [fix] typings for #7863 --- src/runtime/internal/dev.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/internal/dev.ts b/src/runtime/internal/dev.ts index 02677172fa..32d14571d9 100644 --- a/src/runtime/internal/dev.ts +++ b/src/runtime/internal/dev.ts @@ -126,7 +126,7 @@ export function validate_void_dynamic_element(tag: undefined | string) { type Props = Record; export interface SvelteComponentDev { $set(props?: Props): void; - $on(event: string, callback: (event: any) => void): () => void; + $on(event: string, callback: ((event: any) => void) | null | undefined): () => void; $destroy(): void; [accessor: string]: any; } @@ -196,7 +196,7 @@ export interface SvelteComponentTyped< Slots extends Record = any // eslint-disable-line @typescript-eslint/no-unused-vars > { $set(props?: Partial): void; - $on>(type: K, callback: (e: Events[K]) => void): () => void; + $on>(type: K, callback: ((e: Events[K]) => void) | null | undefined): () => void; $destroy(): void; [accessor: string]: any; }