|
|
@ -11,19 +11,19 @@ export function get_current_component() {
|
|
|
|
return current_component;
|
|
|
|
return current_component;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export function beforeUpdate(fn) {
|
|
|
|
export function beforeUpdate(fn: () => any) {
|
|
|
|
get_current_component().$$.before_update.push(fn);
|
|
|
|
get_current_component().$$.before_update.push(fn);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export function onMount(fn) {
|
|
|
|
export function onMount(fn: () => any) {
|
|
|
|
get_current_component().$$.on_mount.push(fn);
|
|
|
|
get_current_component().$$.on_mount.push(fn);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export function afterUpdate(fn) {
|
|
|
|
export function afterUpdate(fn: () => any) {
|
|
|
|
get_current_component().$$.after_update.push(fn);
|
|
|
|
get_current_component().$$.after_update.push(fn);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export function onDestroy(fn) {
|
|
|
|
export function onDestroy(fn: () => any) {
|
|
|
|
get_current_component().$$.on_destroy.push(fn);
|
|
|
|
get_current_component().$$.on_destroy.push(fn);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|