covered function
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)`.
import { covered } from '@dioramajs/diorama/transitions'. Resolves false at once without the plugin, before the app runs, or when the cover can't play.
function covered(
app: { readonly cover?: CoverApi },
at?: CoverOrigin,
): Promise<boolean>Parameters
| Name | Type | Description |
|---|---|---|
app | { readonly cover?: CoverApi } | |
at? | CoverOrigin |
Also exported from @dioramajs/transitions/cover.
Defined in packages/transitions/src/cover/index.ts.