Skip to content

Commit 15b66b5

Browse files
committed
docs: generate fixed types for the Svelte 4 event dispatcher
1 parent 3d6c1c0 commit 15b66b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/svelte/types/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ declare module 'svelte' {
381381
* The event dispatcher can be typed to narrow the allowed event names and the type of the `detail` argument:
382382
* ```ts
383383
* const dispatch = createEventDispatcher<{
384-
* loaded: never; // does not take a detail argument
384+
* loaded: null; // does not take a detail argument
385385
* change: string; // takes a detail argument of type string, which is required
386386
* optional: number | null; // takes an optional detail argument of type number
387387
* }>();

0 commit comments

Comments
 (0)