get rid of the arg0, arg1 stuff

pull/15933/head
Rich Harris 4 months ago
parent 1d4aa8a967
commit 11e086bb25

@ -35,14 +35,14 @@ export function createAttachmentKey() {
* @template {EventTarget} E * @template {EventTarget} E
* @template {unknown} T * @template {unknown} T
* @overload * @overload
* @param {Action<E, T> | function(E, T): void | ActionReturn<T>} action The action function * @param {Action<E, T> | ((element: E, arg: T) => void | ActionReturn<T>)} action The action function
* @param {() => T} fn A function that returns the argument for the action * @param {() => T} fn A function that returns the argument for the action
* @returns {Attachment<E>} * @returns {Attachment<E>}
*/ */
/** /**
* @template {EventTarget} E * @template {EventTarget} E
* @overload * @overload
* @param {Action<E, void> | function(E): void | ActionReturn<void>} action The action function * @param {Action<E, void> | ((element: E) => void | ActionReturn<void>)} action The action function
* @returns {Attachment<E>} * @returns {Attachment<E>}
*/ */
/** /**
@ -54,7 +54,7 @@ export function createAttachmentKey() {
* *
* @template {EventTarget} E * @template {EventTarget} E
* @template {unknown} T * @template {unknown} T
* @param {Action<E, T> | function(E, T): void | ActionReturn<T>} action The action function * @param {Action<E, T> | ((element: E, arg: T) => void | ActionReturn<T>)} action The action function
* @param {() => T} fn A function that returns the argument for the action * @param {() => T} fn A function that returns the argument for the action
* @returns {Attachment<E>} * @returns {Attachment<E>}
* @since 5.32 * @since 5.32

@ -625,7 +625,7 @@ declare module 'svelte/animate' {
} }
declare module 'svelte/attachments' { declare module 'svelte/attachments' {
import type { ActionReturn, Action } from 'svelte/action'; import type { Action, ActionReturn } from 'svelte/action';
/** /**
* An [attachment](https://svelte.dev/docs/svelte/@attach) is a function that runs when an element is mounted * An [attachment](https://svelte.dev/docs/svelte/@attach) is a function that runs when an element is mounted
* to the DOM, and optionally returns a function that is called when the element is later removed. * to the DOM, and optionally returns a function that is called when the element is later removed.
@ -660,9 +660,9 @@ declare module 'svelte/attachments' {
*/ */
export function createAttachmentKey(): symbol; export function createAttachmentKey(): symbol;
export function fromAction<E extends EventTarget, T extends unknown>(action: Action<E, T> | ((arg0: E, arg1: T) => void | ActionReturn<T>), fn: () => T): Attachment<E>; export function fromAction<E extends EventTarget, T extends unknown>(action: Action<E, T> | ((element: E, arg: T) => void | ActionReturn<T>), fn: () => T): Attachment<E>;
export function fromAction<E extends EventTarget>(action: Action<E, void> | ((arg0: E) => void | ActionReturn<void>)): Attachment<E>; export function fromAction<E extends EventTarget>(action: Action<E, void> | ((element: E) => void | ActionReturn<void>)): Attachment<E>;
export {}; export {};
} }

Loading…
Cancel
Save