Skip to content

Commit

Permalink
feat: add RouteWithAnimation interface to type definition file (#478)
Browse files Browse the repository at this point in the history
* feat: add RouteWithAnimation interface to type definition file

* fix: Anton's review points
  • Loading branch information
miladkdz authored Sep 29, 2020
1 parent 397d8a7 commit 1e4a4b1
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions interfaces.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@ declare module './dist/vaadin-router' {
redirect?: string;
}

interface AnimateCustomClasses {
enter?: string;
leave?: string;
}

interface AnimatableRoute extends BaseRoute {
animate?: boolean | AnimateCustomClasses;
}

interface RouteWithAction extends BaseRoute {
action: ActionFn;
}
Expand All @@ -103,11 +112,11 @@ declare module './dist/vaadin-router' {
bundle: string;
}

interface RouteWithChildren extends BaseRoute {
interface RouteWithChildren extends AnimatableRoute {
children: Route[] | ChildrenFn;
}

interface RouteWithComponent extends BaseRoute {
interface RouteWithComponent extends AnimatableRoute {
component: string;
}

Expand All @@ -119,7 +128,7 @@ declare module './dist/vaadin-router' {
| RouteWithBundle
| RouteWithChildren
| RouteWithComponent
| RouteWithRedirect;
| RouteWithRedirect
type _Route = Route;

export interface RouterOptions {
Expand Down

0 comments on commit 1e4a4b1

Please sign in to comment.