Upgrading to 0.8.1
Breaking changes
Rejection registration
Custom rejection types are inferred from the router's rejections option instead of Register.rejections. Remove the rejections declaration from Register, register your router type, and provide the rejection component in the router options.
ts
const router = createRouter(routes, {
rejections: { AuthNeeded: AuthNeededView },
})
declare module '@kitbag/router' {
interface Register {
router: typeof router
}
}This is the syntax for 0.8.1. The rejection option changes to an array of definitions in 0.20.11. See Rejections for current usage.