pull/10798/head
Rich Harris 2 years ago
parent bf476cc312
commit 807ffcb51a

@ -174,7 +174,7 @@ export function bind_transition(element, get_fn, get_params, direction, global)
if (!current_options?.duration) {
current_options = null;
callback?.();
callback();
return;
}
@ -207,7 +207,7 @@ export function bind_transition(element, get_fn, get_params, direction, global)
.then(() => {
p = target;
current_animation = current_options = null;
callback?.();
callback();
})
.catch(noop);
} else if (tick) {
@ -238,6 +238,8 @@ export function bind_transition(element, get_fn, get_params, direction, global)
});
current_options = null;
} else {
setTimeout(callback, duration);
}
}
};

@ -345,7 +345,7 @@ export type ProxyStateObject<T = Record<string | symbol, any>> = T & {
// happy we don't need them, and rename this
export interface Transition2 {
global: boolean;
to(target: number, callback?: () => void): void;
to(target: number, callback: () => void): void;
}
export * from './reactivity/types';

Loading…
Cancel
Save