diff --git a/Router.d.ts b/Router.d.ts index 842f9bc..aefe7e2 100644 --- a/Router.d.ts +++ b/Router.d.ts @@ -156,6 +156,15 @@ interface RouterEvent { detail: T } +/** Event type for conditionsFailed */ +export type ConditionsFailedEvent = RouterEvent + +/** Event type for routeLoading */ +export type RouteLoadingEvent = RouterEvent + +/** Event type for routeLoaded */ +export type RouteLoadedEvent = RouterEvent + /** * Router component */ @@ -190,6 +199,7 @@ export default class Router extends SvelteComponent { } $on(event: 'routeEvent', callback: (event: CustomEvent) => void): () => void - $on(event: 'routeLoading' | 'conditionsFailed', callback: (event: RouterEvent) => void): () => void - $on(event: 'routeLoaded', callback: (event: RouterEvent) => void): () => void + $on(event: 'conditionsFailed', callback: (event: ConditionsFailedEvent) => void): () => void + $on(event: 'routeLoading', callback: (event: RouteLoadingEvent) => void): () => void + $on(event: 'routeLoaded', callback: (event: RouteLoadedEvent) => void): () => void }