mirror of
https://github.com/sveltejs/svelte.git
synced 2024-12-01 17:30:59 +01:00
[fix] typings for #7863
This commit is contained in:
parent
ee5479d00e
commit
c12704c301
@ -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;
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user