Skip to content

Commit

Permalink
[fix] typings for #7863
Browse files Browse the repository at this point in the history
  • Loading branch information
dummdidumm authored Sep 28, 2022
1 parent ee5479d commit c12704c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/runtime/internal/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export function validate_void_dynamic_element(tag: undefined | string) {
type Props = Record<string, any>;
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;
}
Expand Down Expand Up @@ -196,7 +196,7 @@ export interface SvelteComponentTyped<
Slots extends Record<string, any> = any // eslint-disable-line @typescript-eslint/no-unused-vars
> {
$set(props?: Partial<Props>): void;
$on<K extends Extract<keyof Events, string>>(type: K, callback: (e: Events[K]) => void): () => void;
$on<K extends Extract<keyof Events, string>>(type: K, callback: ((e: Events[K]) => void) | null | undefined): () => void;
$destroy(): void;
[accessor: string]: any;
}
Expand Down

0 comments on commit c12704c

Please sign in to comment.