docs: Switch typing of Action<Parameter> from null to undefined in 12-use.md (#14798)

* Update 12-use.md -

* Remove unecessary line in Action typing example

* drive-by formatting fix

---------

Co-authored-by: Rich Harris <rich.harris@vercel.com>
pull/14243/merge
Felipe 5 days ago committed by GitHub
parent fb67bad5b0
commit 8201d7ad8b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -50,17 +50,16 @@ The `Action` interface receives three optional type arguments — a node type (w
```svelte ```svelte
<!--- file: App.svelte ---> <!--- file: App.svelte --->
<script> <script>
import { on } from 'svelte/events';
/** /**
* @type {import('svelte/action').Action< * @type {import('svelte/action').Action<
* HTMLDivElement, * HTMLDivElement,
* null, * undefined,
* { * {
* onswiperight: (e: CustomEvent) => void; * onswiperight: (e: CustomEvent) => void;
* onswipeleft: (e: CustomEvent) => void; * onswipeleft: (e: CustomEvent) => void;
* // ... * // ...
* }>} * }
* >}
*/ */
function gestures(node) { function gestures(node) {
$effect(() => { $effect(() => {

Loading…
Cancel
Save