From 1246260fd512ab899758ec836f07a7fb99acfe9d Mon Sep 17 00:00:00 2001 From: Simon H <5968653+dummdidumm@users.noreply.github.com> Date: Tue, 18 Apr 2023 10:31:33 +0200 Subject: [PATCH] Update src/runtime/internal/lifecycle.ts --- src/runtime/internal/lifecycle.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/internal/lifecycle.ts b/src/runtime/internal/lifecycle.ts index 9d68db96de..1c1726c29c 100644 --- a/src/runtime/internal/lifecycle.ts +++ b/src/runtime/internal/lifecycle.ts @@ -33,7 +33,7 @@ export function beforeUpdate(fn: () => any) { * * https://svelte.dev/docs#run-time-svelte-onmount */ -export function onMount(fn: () => T extends Promise<() => any> ? never : T): void { +export function onMount(fn: () => T extends Promise<() => any> ? "Returning a function asynchronously from onMount won't call that function on destroy" : T): void { get_current_component().$$.on_mount.push(fn); }