We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ec9283 commit 4669047Copy full SHA for 4669047
src/runtime/internal/lifecycle.ts
@@ -11,19 +11,19 @@ export function get_current_component() {
11
return current_component;
12
}
13
14
-export function beforeUpdate(fn) {
+export function beforeUpdate(fn: () => any) {
15
get_current_component().$$.before_update.push(fn);
16
17
18
-export function onMount(fn) {
+export function onMount(fn: () => any) {
19
get_current_component().$$.on_mount.push(fn);
20
21
22
-export function afterUpdate(fn) {
+export function afterUpdate(fn: () => any) {
23
get_current_component().$$.after_update.push(fn);
24
25
26
-export function onDestroy(fn) {
+export function onDestroy(fn: () => any) {
27
get_current_component().$$.on_destroy.push(fn);
28
29
0 commit comments