diff --git a/packages/svelte/src/attachments/public.d.ts b/packages/svelte/src/attachments/public.d.ts index bda77a8e7d..8680139bc7 100644 --- a/packages/svelte/src/attachments/public.d.ts +++ b/packages/svelte/src/attachments/public.d.ts @@ -15,7 +15,7 @@ export interface FromAction( ...args: undefined extends NoInfer ? [ - action: (node: Node, parameter?: Parameter) => void | ActionReturn, + action: (node: Node, parameter?: never) => void | ActionReturn, parameter?: () => NoInfer ] : [ diff --git a/packages/svelte/types/index.d.ts b/packages/svelte/types/index.d.ts index 1c96afd61f..0822c02d6d 100644 --- a/packages/svelte/types/index.d.ts +++ b/packages/svelte/types/index.d.ts @@ -641,7 +641,7 @@ declare module 'svelte/attachments' { ( ...args: undefined extends NoInfer ? [ - action: (node: Node, parameter?: Parameter) => void | ActionReturn, + action: (node: Node, parameter?: never) => void | ActionReturn, parameter?: () => NoInfer ] : [ @@ -673,7 +673,7 @@ declare module 'svelte/attachments' { * @since 5.29 */ export function createAttachmentKey(): symbol; - export function fromAction(...args: undefined extends NoInfer ? [action: (node: Node, parameter?: Parameter | undefined) => void | ActionReturn>, parameter?: (() => NoInfer) | undefined] : [action: (node: Node, parameter: Parameter) => void | ActionReturn>, parameter: () => NoInfer]): Attachment; + export function fromAction(...args: undefined extends NoInfer ? [action: (node: Node, parameter?: never) => void | ActionReturn>, parameter?: (() => NoInfer) | undefined] : [action: (node: Node, parameter: Parameter) => void | ActionReturn>, parameter: () => NoInfer]): Attachment; export {}; }