TransitionBeforeSwapEvent Class — astro Architecture
Architecture documentation for the TransitionBeforeSwapEvent class in events.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 8207345b_afa6_dd08_ab18_8b35a756d317["TransitionBeforeSwapEvent"] 75c59a6f_ee5d_6669_2750_97d28d913e90["events.ts"] 8207345b_afa6_dd08_ab18_8b35a756d317 -->|defined in| 75c59a6f_ee5d_6669_2750_97d28d913e90 fb3fec80_31a2_8b88_6da0_348863d0cf20["constructor()"] 8207345b_afa6_dd08_ab18_8b35a756d317 -->|method| fb3fec80_31a2_8b88_6da0_348863d0cf20
Relationship Graph
Source Code
packages/astro/src/transitions/events.ts lines 120–148
export class TransitionBeforeSwapEvent extends BeforeEvent {
readonly direction: Direction | string;
readonly viewTransition: ViewTransition;
swap: () => void;
constructor(afterPreparation: BeforeEvent, viewTransition: ViewTransition) {
super(
TRANSITION_BEFORE_SWAP,
undefined,
afterPreparation.from,
afterPreparation.to,
afterPreparation.direction,
afterPreparation.navigationType,
afterPreparation.sourceElement,
afterPreparation.info,
afterPreparation.newDocument,
afterPreparation.signal,
);
this.direction = afterPreparation.direction;
this.viewTransition = viewTransition;
this.swap = () => swap(this.newDocument);
Object.defineProperties(this, {
direction: { enumerable: true },
viewTransition: { enumerable: true },
swap: { enumerable: true, writable: true },
});
}
}
Domain
Defined In
Source
Frequently Asked Questions
What is the TransitionBeforeSwapEvent class?
TransitionBeforeSwapEvent is a class in the astro codebase, defined in packages/astro/src/transitions/events.ts.
Where is TransitionBeforeSwapEvent defined?
TransitionBeforeSwapEvent is defined in packages/astro/src/transitions/events.ts at line 120.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free