# Transition

interface in `@dioramajs/diorama/transitions`

```ts
import type { Transition } from '@dioramajs/diorama/transitions'
```

Thenable. Resolves with the result and never rejects.

```ts
interface Transition extends PromiseLike<TransitionResult>
```

## Members

| Name | Type | Description |
| --- | --- | --- |
| `auto` | `boolean` | Created by auto mode or a late partner rather than by app.transition. |
| `entering` | `readonly Presence[]` | New copies in view. Only with `enter` > 0 or in a browser view transition. |
| `finished` | `Promise<TransitionResult>` | Never rejects. |
| `flights` | `readonly Flight[]` | Filled when flying starts. |
| `leaving` | `readonly Presence[]` | Unpaired copies of removed elements. Only with `leave` > 0 or in a browser view transition. |
| `phase` | `ReadonlySignal<TransitionPhase>` | Current phase. |
| `swapped` | `Promise<void>` | Settles with the swap, or rejects with its error. If this transition is still current it also waits for the new page's reconcile. Supersede, abort and timeout don't settle it early. |
| `abort` | `abort(): void` | Lands everything now and ends with `aborted`. |
| `finish` | `finish(): void` | Lands everything now. Copies jump to their targets and fades end. |
| `then` | `then<TResult1 = TransitionResult, TResult2 = never>(onfulfilled?: (value: TransitionResult) => TResult1 \| PromiseLike<TResult1> \| null, onrejected?: (reason: any) => TResult2 \| PromiseLike<TResult2> \| null): PromiseLike<TResult1 \| TResult2>` | Attaches callbacks for the resolution and/or rejection of the Promise. |

Also exported from `@dioramajs/transitions`.

Defined in [packages/transitions/src/types.ts](https://github.com/MasterKurosava/diorama/blob/main/packages/transitions/src/types.ts#L112).
