From 99764b2cf0f50cd38d0ee677229f2f1239db97dc Mon Sep 17 00:00:00 2001 From: Tan Li Hau Date: Wed, 13 Apr 2022 18:07:22 +0800 Subject: [PATCH] Update src/runtime/action/index.ts Co-authored-by: Ignatius Bagus --- src/runtime/action/index.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/runtime/action/index.ts b/src/runtime/action/index.ts index cc0047603a..679ebc7e41 100644 --- a/src/runtime/action/index.ts +++ b/src/runtime/action/index.ts @@ -17,14 +17,10 @@ * * Docs: https://svelte.dev/docs#template-syntax-element-directives-use-action */ -export type ActionReturn = void extends Parameter - ? { - destroy?: () => void; - } - : { - update?: (parameter: Parameter) => void; - destroy?: () => void; - } +interface ActionReturn { + update?: void extends Parameter ? undefined : (parameter: Parameter) => void; + destroy?: () => void; +} /** * Actions are functions that are called when an element is created.