From 1c559fba964caeec3e21c015b82ceff5829d967c Mon Sep 17 00:00:00 2001 From: Vlad Rindevich Date: Wed, 9 Oct 2024 16:20:47 +0300 Subject: [PATCH] fix: Router#resolve typings (#891) --- src/router.ts | 4 +++- src/triggers/popstate.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/router.ts b/src/router.ts index 0d65bdcd..36d90a6b 100644 --- a/src/router.ts +++ b/src/router.ts @@ -699,7 +699,9 @@ export class Router) => Promise & RedirectContextInfo>; + declare ['resolve']: ( + contextOrPathname: RouteContext | string, + ) => Promise & RedirectContextInfo>; async #redirect( redirectData: RedirectContextInfo, diff --git a/src/triggers/popstate.ts b/src/triggers/popstate.ts index c68871fc..08caf15c 100644 --- a/src/triggers/popstate.ts +++ b/src/triggers/popstate.ts @@ -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') {