# covered

function in `@dioramajs/diorama/transitions`

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

Closes the cover of `app` and resolves true once the page is covered, for routers that change
the page from code: `await covered(app, event); router.push(href)`. Resolves false at once
without the plugin, before the app runs, or when the cover can't play.

```ts
function covered(
  app: { readonly cover?: CoverApi },
  at?: CoverOrigin,
): Promise<boolean>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `app` | `{ readonly cover?: CoverApi }` |  |
| `at?` | `CoverOrigin` |  |

Also exported from `@dioramajs/transitions/cover`.

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