Skip to content

Commit ffe74f6

Browse files
authored
(fix) correct Events typing in svelte-shims.d.ts (#775)
1 parent 8b3d15a commit ffe74f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/svelte2tsx/svelte-shims.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ declare class Svelte2TsxComponent<
2929
* Causes the callback function to be called whenever the component dispatches an event.
3030
* A function is returned that will remove the event listener when called.
3131
*/
32-
$on<K extends keyof Events>(event: K, handler: (e: Events[K]) => any): () => void;
32+
$on<K extends keyof Events & string>(event: K, handler: (e: Events[K]) => any): () => void;
3333
/**
3434
* Removes a component from the DOM and triggers any `onDestroy` handlers.
3535
*/

0 commit comments

Comments
 (0)