Skip to content

Commit

Permalink
fix: Router#resolve typings (#891)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lodin authored Oct 9, 2024
1 parent 78ff48b commit 1c559fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,9 @@ export class Router<R extends AnyObject = EmptyObject, C extends AnyObject = Emp
return context.__renderId === this.#lastStartedRenderId;
}

declare ['resolve']: (context: RouteContext<R, C>) => Promise<RouteContext<R, C> & RedirectContextInfo>;
declare ['resolve']: (
contextOrPathname: RouteContext<R, C> | string,
) => Promise<RouteContext<R, C> & RedirectContextInfo>;

async #redirect(
redirectData: RedirectContextInfo,
Expand Down
2 changes: 1 addition & 1 deletion src/triggers/popstate.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { fireRouterEvent } from '../utils.js';
import type { NavigationTrigger } from '../types.js';
import { fireRouterEvent } from '../utils.js';

function vaadinRouterGlobalPopstateHandler(event: PopStateEvent) {
if (event.state === 'vaadin-router-ignore') {
Expand Down

0 comments on commit 1c559fb

Please sign in to comment.