Skip to content

Commit

Permalink
refactor: reorganize types and add initial experimental router
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Dec 17, 2024
1 parent 2ab9c32 commit a515a21
Show file tree
Hide file tree
Showing 8 changed files with 1,451 additions and 333 deletions.
22 changes: 21 additions & 1 deletion packages/router/src/errors.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import type { MatcherLocationRaw, MatcherLocation } from './types'
import type { RouteLocationRaw, RouteLocationNormalized } from './typed-routes'
import type {
RouteLocationRaw,
RouteLocationNormalized,
RouteLocationNormalizedLoaded,
} from './typed-routes'
import { assign } from './utils'

/**
Expand Down Expand Up @@ -199,3 +203,19 @@ function stringifyRoute(to: RouteLocationRaw): string {
}
return JSON.stringify(location, null, 2)
}
/**
* Internal type to define an ErrorHandler
*
* @param error - error thrown
* @param to - location we were navigating to when the error happened
* @param from - location we were navigating from when the error happened
* @internal
*/

export interface _ErrorListener {
(
error: any,
to: RouteLocationNormalized,
from: RouteLocationNormalizedLoaded
): any
}
Loading

0 comments on commit a515a21

Please sign in to comment.