pull/10798/head
Rich Harris 2 years ago
parent a9266bb65b
commit 884110a32b

@ -104,7 +104,7 @@ export function transition(flags, element, get_fn, get_params) {
return (current_options ??= get_fn()(element, get_params?.(), { direction }));
}
/** @type {import('#client').Transition} */
/** @type {import('#client').TransitionManager} */
var transition = {
is_global,
async in() {

@ -264,7 +264,7 @@ export function destroy_effect(effect) {
* @param {() => void} callback
*/
export function pause_effect(effect, callback = noop) {
/** @type {import('#client').Transition[]} */
/** @type {import('#client').TransitionManager[]} */
const transitions = [];
pause_children(effect, transitions, true);
@ -290,7 +290,7 @@ export function pause_effect(effect, callback = noop) {
/**
* @param {import('#client').Effect} effect
* @param {import('#client').Transition[]} transitions
* @param {import('#client').TransitionManager[]} transitions
* @param {boolean} local
*/
function pause_children(effect, transitions, local) {

@ -1,4 +1,4 @@
import type { Block, ComponentContext, Equals, Transition } from '#client';
import type { Block, ComponentContext, Equals, TransitionManager } from '#client';
import type { EFFECT, PRE_EFFECT, RENDER_EFFECT } from '../constants';
export type EffectType = typeof EFFECT | typeof PRE_EFFECT | typeof RENDER_EFFECT;
@ -51,7 +51,7 @@ export interface Effect extends Reaction {
l: number;
// transitions TODO
transitions: null | Transition[];
transitions: null | TransitionManager[];
ran: boolean; // TODO fold this into the bitmask
}

@ -155,7 +155,7 @@ export type Block =
| EachItemBlock
| SnippetBlock;
export interface Transition {
export interface TransitionManager {
is_global: boolean;
in: () => void;
out: (callback?: () => void) => void;

Loading…
Cancel
Save