Full Code of kitbagjs/router for AI

main 043b3178dfce cached
417 files
785.7 KB
215.1k tokens
727 symbols
1 requests
Download .txt
Showing preview only (880K chars total). Download the full file or copy to clipboard to get everything.
Repository: kitbagjs/router
Branch: main
Commit: 043b3178dfce
Files: 417
Total size: 785.7 KB

Directory structure:
gitextract_w2q946kp/

├── .github/
│   ├── FUNDING.yml
│   ├── dependabot.yml
│   └── workflows/
│       ├── auto-docs.yml
│       ├── notify-stars.yml
│       ├── release.yml
│       └── test.yml
├── .gitignore
├── .nvmrc
├── .vscode/
│   └── settings.json
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── docs/
│   ├── .vitepress/
│   │   ├── config.ts
│   │   └── theme/
│   │       ├── index.js
│   │       └── styles/
│   │           └── vars.css
│   ├── advanced-concepts/
│   │   ├── hooks.md
│   │   ├── plugins.md
│   │   ├── prefetching.md
│   │   ├── redirects.md
│   │   ├── rejections.md
│   │   ├── route-matching.md
│   │   ├── route-meta.md
│   │   ├── route-narrowing.md
│   │   └── route-state.md
│   ├── api/
│   │   ├── components/
│   │   │   ├── RouterLink.md
│   │   │   └── RouterView.md
│   │   ├── compositions/
│   │   │   ├── useLink.md
│   │   │   ├── useQueryValue.md
│   │   │   ├── useRejection.md
│   │   │   ├── useRoute.md
│   │   │   └── useRouter.md
│   │   ├── errors/
│   │   │   ├── DuplicateParamsError.md
│   │   │   ├── MetaPropertyConflict.md
│   │   │   ├── RouterNotInstalledError.md
│   │   │   └── UseRouteInvalidError.md
│   │   ├── functions/
│   │   │   ├── arrayOf.md
│   │   │   ├── asUrlString.md
│   │   │   ├── combineRoutes.md
│   │   │   ├── createExternalRoute.md
│   │   │   ├── createParam.md
│   │   │   ├── createRejection.md
│   │   │   ├── createRoute.md
│   │   │   ├── createRouter.md
│   │   │   ├── createRouterAssets.md
│   │   │   ├── createRouterPlugin.md
│   │   │   ├── createUrl.md
│   │   │   ├── isUrlWithSchema.md
│   │   │   ├── isWithComponent.md
│   │   │   ├── isWithComponentProps.md
│   │   │   ├── isWithComponentPropsRecord.md
│   │   │   ├── isWithComponents.md
│   │   │   ├── isWithParent.md
│   │   │   ├── literal.md
│   │   │   ├── tupleOf.md
│   │   │   ├── unionOf.md
│   │   │   ├── withDefault.md
│   │   │   └── withParams.md
│   │   ├── hooks/
│   │   │   ├── onAfterRouteLeave.md
│   │   │   ├── onAfterRouteUpdate.md
│   │   │   ├── onBeforeRouteLeave.md
│   │   │   └── onBeforeRouteUpdate.md
│   │   ├── index.md
│   │   ├── interfaces/
│   │   │   └── Register.md
│   │   ├── type-guards/
│   │   │   ├── isRoute.md
│   │   │   └── isUrlString.md
│   │   ├── typedoc-sidebar.json
│   │   ├── types/
│   │   │   ├── AddAfterEnterHook.md
│   │   │   ├── AddAfterLeaveHook.md
│   │   │   ├── AddAfterUpdateHook.md
│   │   │   ├── AddBeforeEnterHook.md
│   │   │   ├── AddBeforeLeaveHook.md
│   │   │   ├── AddBeforeUpdateHook.md
│   │   │   ├── AddComponentHook.md
│   │   │   ├── AddErrorHook.md
│   │   │   ├── AddGlobalHooks.md
│   │   │   ├── AddPluginErrorHook.md
│   │   │   ├── AfterEnterHook.md
│   │   │   ├── AfterEnterHookContext.md
│   │   │   ├── AfterHookLifecycle.md
│   │   │   ├── AfterHookResponse.md
│   │   │   ├── AfterHookRunner.md
│   │   │   ├── AfterLeaveHook.md
│   │   │   ├── AfterLeaveHookContext.md
│   │   │   ├── AfterUpdateHook.md
│   │   │   ├── AfterUpdateHookContext.md
│   │   │   ├── BeforeEnterHook.md
│   │   │   ├── BeforeEnterHookContext.md
│   │   │   ├── BeforeHookLifecycle.md
│   │   │   ├── BeforeHookResponse.md
│   │   │   ├── BeforeHookRunner.md
│   │   │   ├── BeforeLeaveHook.md
│   │   │   ├── BeforeLeaveHookContext.md
│   │   │   ├── BeforeUpdateHook.md
│   │   │   ├── BeforeUpdateHookContext.md
│   │   │   ├── ComponentHook.md
│   │   │   ├── ComponentHookRegistration.md
│   │   │   ├── CreateRouteOptions.md
│   │   │   ├── CreateRouteProps.md
│   │   │   ├── CreateRouterPluginOptions.md
│   │   │   ├── CreateUrlOptions.md
│   │   │   ├── CreatedRouteOptions.md
│   │   │   ├── EmptyRouterPlugin.md
│   │   │   ├── ErrorHook.md
│   │   │   ├── ErrorHookContext.md
│   │   │   ├── ErrorHookRunner.md
│   │   │   ├── ErrorHookRunnerContext.md
│   │   │   ├── ExternalRouteHooks.md
│   │   │   ├── GenericRoute.md
│   │   │   ├── HookLifecycle.md
│   │   │   ├── HookRemove.md
│   │   │   ├── HookTiming.md
│   │   │   ├── InternalRouteHooks.md
│   │   │   ├── LiteralParam.md
│   │   │   ├── Param.md
│   │   │   ├── ParamExtras.md
│   │   │   ├── ParamGetSet.md
│   │   │   ├── ParamGetter.md
│   │   │   ├── ParamSetter.md
│   │   │   ├── ParseUrlOptions.md
│   │   │   ├── PluginAfterRouteHook.md
│   │   │   ├── PluginBeforeRouteHook.md
│   │   │   ├── PluginErrorHook.md
│   │   │   ├── PluginErrorHookContext.md
│   │   │   ├── PluginRouteHooks.md
│   │   │   ├── PrefetchConfig.md
│   │   │   ├── PrefetchConfigOptions.md
│   │   │   ├── PrefetchConfigs.md
│   │   │   ├── PrefetchStrategy.md
│   │   │   ├── PropsCallbackContext.md
│   │   │   ├── PropsCallbackParent.md
│   │   │   ├── PropsGetter.md
│   │   │   ├── QuerySource.md
│   │   │   ├── RegisteredRouter.md
│   │   │   ├── ResolvedRoute.md
│   │   │   ├── ResolvedRouteUnion.md
│   │   │   ├── Route.md
│   │   │   ├── RouteMeta.md
│   │   │   ├── Router.md
│   │   │   ├── RouterAssets.md
│   │   │   ├── RouterLinkProps.md
│   │   │   ├── RouterOptions.md
│   │   │   ├── RouterPlugin.md
│   │   │   ├── RouterPush.md
│   │   │   ├── RouterPushOptions.md
│   │   │   ├── RouterReject.md
│   │   │   ├── RouterRejections.md
│   │   │   ├── RouterReplace.md
│   │   │   ├── RouterReplaceOptions.md
│   │   │   ├── RouterResolve.md
│   │   │   ├── RouterResolveOptions.md
│   │   │   ├── RouterResolvedRouteUnion.md
│   │   │   ├── RouterRoute.md
│   │   │   ├── RouterRouteName.md
│   │   │   ├── RouterRouteUnion.md
│   │   │   ├── RouterRoutes.md
│   │   │   ├── RouterViewPropsGetter.md
│   │   │   ├── Routes.md
│   │   │   ├── ToCallback.md
│   │   │   ├── ToRoute.md
│   │   │   ├── ToUrl.md
│   │   │   ├── Url.md
│   │   │   ├── UrlParamsReading.md
│   │   │   ├── UrlParamsWriting.md
│   │   │   ├── UrlString.md
│   │   │   ├── UseLink.md
│   │   │   ├── UseLinkOptions.md
│   │   │   ├── WithHost.md
│   │   │   ├── WithParent.md
│   │   │   ├── WithoutHost.md
│   │   │   └── WithoutParent.md
│   │   └── variables/
│   │       └── IS_URL_SYMBOL.md
│   ├── components/
│   │   ├── router-link.md
│   │   └── router-view.md
│   ├── composables/
│   │   ├── useLink.md
│   │   ├── useQueryValue.md
│   │   ├── useRoute.md
│   │   └── useRouter.md
│   ├── core-concepts/
│   │   ├── component-props.md
│   │   ├── external-routes.md
│   │   ├── navigation.md
│   │   ├── params.md
│   │   ├── router-route.md
│   │   ├── router.md
│   │   └── routes.md
│   ├── index.md
│   ├── introduction.md
│   ├── migrating-vue-router.md
│   └── quick-start.md
├── eslint.config.js
├── package.json
├── scripts/
│   └── api.js
├── src/
│   ├── components/
│   │   ├── echo.ts
│   │   ├── helloWorld.ts
│   │   ├── rejection.ts
│   │   ├── routerLink.browser.spec.ts
│   │   ├── routerLink.ts
│   │   ├── routerView.browser.spec.ts
│   │   ├── routerView.spec.ts
│   │   └── routerView.ts
│   ├── compositions/
│   │   ├── useComponentsStore.ts
│   │   ├── useEventListener.ts
│   │   ├── useLink.ts
│   │   ├── usePrefetching.ts
│   │   ├── usePropStore.ts
│   │   ├── useQueryValue.browser.spec.ts
│   │   ├── useQueryValue.spec-d.ts
│   │   ├── useQueryValue.ts
│   │   ├── useRejection.ts
│   │   ├── useRoute.browser.spec.ts
│   │   ├── useRoute.spec-d.ts
│   │   ├── useRoute.ts
│   │   ├── useRouter.ts
│   │   ├── useRouterDepth.ts
│   │   ├── useRouterHooks.ts
│   │   └── useVisibilityObserver.ts
│   ├── devtools/
│   │   ├── createRouterDevtools.ts
│   │   ├── filters.ts
│   │   ├── getDevtoolsLabel.ts
│   │   └── types.ts
│   ├── errors/
│   │   ├── contextAbortError.ts
│   │   ├── contextError.ts
│   │   ├── contextPushError.ts
│   │   ├── contextRejectionError.ts
│   │   ├── duplicateNamesError.ts
│   │   ├── duplicateParamsError.ts
│   │   ├── initialRouteMissingError.ts
│   │   ├── invalidRouteParamValueError.ts
│   │   ├── invalidRouteRedirectError.ts
│   │   ├── metaPropertyConflict.ts
│   │   ├── multipleRouteRedirectsError.ts
│   │   ├── routeNotFoundError.ts
│   │   ├── routerNotInstalledError.ts
│   │   └── useRouteInvalidError.ts
│   ├── guards/
│   │   ├── routes.spec-d.ts
│   │   └── routes.ts
│   ├── keys.ts
│   ├── main.ts
│   ├── models/
│   │   └── hooks.ts
│   ├── services/
│   │   ├── arrayOf.spec.ts
│   │   ├── arrayOf.ts
│   │   ├── combineHash.spec.ts
│   │   ├── combineHash.ts
│   │   ├── combineMeta.spec.ts
│   │   ├── combineMeta.ts
│   │   ├── combinePath.spec-d.ts
│   │   ├── combinePath.spec.ts
│   │   ├── combinePath.ts
│   │   ├── combineQuery.spec.ts
│   │   ├── combineQuery.ts
│   │   ├── combineState.spec.ts
│   │   ├── combineState.ts
│   │   ├── combineUrl.spec.ts
│   │   ├── combineUrl.ts
│   │   ├── component.browser.spec.ts
│   │   ├── component.ts
│   │   ├── createComponentHooks.ts
│   │   ├── createComponentsStore.ts
│   │   ├── createCurrentRejection.ts
│   │   ├── createCurrentRoute.ts
│   │   ├── createExternalRoute.spec.ts
│   │   ├── createExternalRoute.ts
│   │   ├── createIsExternal.spec.ts
│   │   ├── createIsExternal.ts
│   │   ├── createParam.ts
│   │   ├── createPropStore.ts
│   │   ├── createRejection.ts
│   │   ├── createRejectionHooks.ts
│   │   ├── createResolvedRoute.spec.ts
│   │   ├── createResolvedRoute.ts
│   │   ├── createResolvedRouteQuery.ts
│   │   ├── createRoute.spec-d.ts
│   │   ├── createRoute.spec.ts
│   │   ├── createRoute.ts
│   │   ├── createRouteHooks.ts
│   │   ├── createRouteId.ts
│   │   ├── createRouteRedirects.spec.ts
│   │   ├── createRouteRedirects.ts
│   │   ├── createRouter.browser.spec.ts
│   │   ├── createRouter.spec-d.ts
│   │   ├── createRouter.spec.ts
│   │   ├── createRouter.ts
│   │   ├── createRouterAssets.ts
│   │   ├── createRouterCallbackContext.ts
│   │   ├── createRouterHistory.browser.spec.ts
│   │   ├── createRouterHistory.ts
│   │   ├── createRouterHooks.ts
│   │   ├── createRouterKeyStore.ts
│   │   ├── createRouterPlugin.browser.spec.ts
│   │   ├── createRouterPlugin.spec-d.ts
│   │   ├── createRouterPlugin.ts
│   │   ├── createRouterRoute.spec.ts
│   │   ├── createRouterRoute.ts
│   │   ├── createUniqueIdSequence.ts
│   │   ├── createUrl.spec.ts
│   │   ├── createUrl.ts
│   │   ├── createVisibilityObserver.ts
│   │   ├── createVueAppStore.ts
│   │   ├── getGlobalHooksForRouter.ts
│   │   ├── getGlobalRouteHooks.ts
│   │   ├── getInitialUrl.browser.spec.ts
│   │   ├── getInitialUrl.spec.ts
│   │   ├── getInitialUrl.ts
│   │   ├── getMatchesForUrl.spec.ts
│   │   ├── getMatchesForUrl.ts
│   │   ├── getParamsForString.ts
│   │   ├── getRejectionHooks.ts
│   │   ├── getRouteHooks.spec.ts
│   │   ├── getRouteHooks.ts
│   │   ├── getRoutesForRouter.spec.ts
│   │   ├── getRoutesForRouter.ts
│   │   ├── history.browser.spec.ts
│   │   ├── history.ts
│   │   ├── hooks.browser.spec.ts
│   │   ├── hooks.spec.ts
│   │   ├── hooks.ts
│   │   ├── insertBaseRoute.spec.ts
│   │   ├── insertBaseRoute.ts
│   │   ├── literal.ts
│   │   ├── params.spec.ts
│   │   ├── params.ts
│   │   ├── paramsFinder.spec.ts
│   │   ├── paramsFinder.ts
│   │   ├── queryParamFilter.spec.ts
│   │   ├── queryParamFilter.ts
│   │   ├── routeRegex.spec.ts
│   │   ├── routeRegex.ts
│   │   ├── state.spec.ts
│   │   ├── state.ts
│   │   ├── tupleOf.spec.ts
│   │   ├── tupleOf.ts
│   │   ├── unionOf.spec.ts
│   │   ├── unionOf.ts
│   │   ├── urlParser.spec.ts
│   │   ├── urlParser.ts
│   │   ├── valibot.spec-d.ts
│   │   ├── valibot.spec.ts
│   │   ├── valibot.ts
│   │   ├── withDefault.ts
│   │   ├── withParams.spec-d.ts
│   │   ├── withParams.spec.ts
│   │   ├── withParams.ts
│   │   ├── zod.spec-d.ts
│   │   ├── zod.spec.ts
│   │   └── zod.ts
│   ├── tests/
│   │   ├── hooks.spec.ts
│   │   ├── routeProps.browser.spec.ts
│   │   └── routeProps.spec.ts
│   ├── types/
│   │   ├── callbackContext.ts
│   │   ├── createRouteOptions.ts
│   │   ├── hooks.ts
│   │   ├── meta.ts
│   │   ├── name.ts
│   │   ├── paramTypes.ts
│   │   ├── params.ts
│   │   ├── prefetch.ts
│   │   ├── props.ts
│   │   ├── querySource.ts
│   │   ├── redirects.spec-d.ts
│   │   ├── redirects.ts
│   │   ├── register.spec.ts
│   │   ├── register.ts
│   │   ├── rejection.ts
│   │   ├── resolved.spec-d.ts
│   │   ├── resolved.ts
│   │   ├── route.spec-d.ts
│   │   ├── route.ts
│   │   ├── routeContext.ts
│   │   ├── routeTitle.browser.spec.ts
│   │   ├── routeTitle.ts
│   │   ├── routeUpdate.ts
│   │   ├── routeWithParams.spec-d.ts
│   │   ├── routeWithParams.ts
│   │   ├── router.ts
│   │   ├── routerAbort.ts
│   │   ├── routerLink.ts
│   │   ├── routerPlugin.ts
│   │   ├── routerPush.ts
│   │   ├── routerReject.ts
│   │   ├── routerReplace.ts
│   │   ├── routerResolve.ts
│   │   ├── routerRoute.ts
│   │   ├── routesMap.spec-ts.ts
│   │   ├── routesMap.ts
│   │   ├── state.ts
│   │   ├── url.ts
│   │   ├── urlString.ts
│   │   ├── useLink.ts
│   │   └── utilities.ts
│   └── utilities/
│       ├── array.ts
│       ├── checkDuplicateNames.spec.ts
│       ├── checkDuplicateNames.ts
│       ├── checkDuplicateParams.spec.ts
│       ├── checkDuplicateParams.ts
│       ├── components.spec.ts
│       ├── components.ts
│       ├── guards.spec.ts
│       ├── guards.ts
│       ├── index.ts
│       ├── isBrowser.browser.spec.ts
│       ├── isBrowser.spec.ts
│       ├── isBrowser.ts
│       ├── isNamedRoute.ts
│       ├── makeOptional.ts
│       ├── prefetch.spec.ts
│       ├── prefetch.ts
│       ├── promises.ts
│       ├── props.ts
│       ├── setDocumentTitle.ts
│       ├── testHelpers.ts
│       ├── trailingSlashes.spec.ts
│       ├── trailingSlashes.ts
│       ├── urlSearchParams.spec.ts
│       └── urlSearchParams.ts
├── tsconfig.json
├── typedoc.mjs
├── typedoc.tsconfig.json
└── vite.config.js

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/FUNDING.yml
================================================
github: pleek91, stackoverfloweth


================================================
FILE: .github/dependabot.yml
================================================
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
  - package-ecosystem: "npm"
    directory: "/"
    schedule:
      interval: "weekly"
    ignore:
      - dependency-name: "@standard-schema/spec"
        update-types: ["version-update:semver-minor", "version-update:semver-patch"]
      - dependency-name: "zod"
        update-types: ["version-update:semver-minor", "version-update:semver-patch"]
    groups:
      build-tools:
        patterns:
          - "vite"
          - "vite-plugin-dts"
          - "@vitejs/plugin-vue"
          - "typescript"
          - "vue-tsc"
      testing:
        patterns:
          - "vitest"
          - "@vue/test-utils"
          - "happy-dom"
      docs:
        patterns:
          - "vitepress"
          - "typedoc"
          - "typedoc-plugin-markdown"
          - "typedoc-vitepress-theme"
      linting:
        patterns:
          - "eslint"
          - "@kitbag/eslint-config"
          - "globals"


================================================
FILE: .github/workflows/auto-docs.yml
================================================
name: Auto Generate Docs

on:
  push:
    tags:
      - 'v*' # Trigger on version tags (v0.20.11, v1.0.0, etc.)
  workflow_dispatch: # Allow manual trigger

permissions:
  contents: write
  pull-requests: write

jobs:
  generate-docs:
    name: Generate Documentation
    runs-on: ubuntu-latest

    steps:
      - name: Setup
        id: setup
        uses: kitbagjs/actions-setup-project@main

      - name: Generate docs
        run: npm run docs:generate

      - name: Create Pull Request
        uses: peter-evans/create-pull-request@v7
        with:
          commit-message: 'docs: auto-generate documentation'
          title: 'docs: Auto-generate documentation'
          body: |
            This PR was automatically generated after a new release tag was created.

            The documentation has been regenerated using `npm run docs:generate`.

            Please review the changes and merge if everything looks correct.
          branch: auto-docs/update
          base: main
          delete-branch: true
          labels: |
            documentation
            automated

================================================
FILE: .github/workflows/notify-stars.yml
================================================
name: Stars Notification to Discord

on:
  watch:
    types: [started]

jobs:
  notify:
    name: Notify Discord
    runs-on: ubuntu-latest
    steps:
      - uses: kitbagjs/actions-notify-stars@main
        with:
          DISCORD_WEBHOOK_URL: ${{secrets.DISCORD_WEBHOOK_URL}}
          GITHUB_REPOSITORY: ${{github.event.repository.name}}
          GITHUB_REPOSITORY_STARS: ${{github.event.repository.stargazers_count}}
          GITHUB_SENDER_LOGIN: ${{github.event.sender.login}}
          GITHUB_SENDER_AVATAR_URL: ${{github.event.sender.avatar_url}}
          GITHUB_SENDER_HTML_URL: ${{github.event.sender.html_url}}


================================================
FILE: .github/workflows/release.yml
================================================
on:
  push:
    tags:
      - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

name: Create Release

jobs:
  release:
    name: Create Release
    runs-on: ubuntu-latest
    permissions: 
      contents: write
    
    steps:
      - uses: kitbagjs/actions-create-release@main
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

================================================
FILE: .github/workflows/test.yml
================================================
name: Tests

on: [pull_request]

jobs:
  unit-tests:
    name: Unit Tests
    runs-on: ubuntu-latest

    steps:
      - name: Setup
        id: setup
        uses: kitbagjs/actions-setup-project@main

      - name: Run tests
        run: npm run test

  types:
    name: Types
    runs-on: ubuntu-latest

    steps:
      - name: Setup
        id: setup
        uses: kitbagjs/actions-setup-project@main

      - name: Run tsc
        run: npm run types

================================================
FILE: .gitignore
================================================
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
*.local
tsconfig.vitest-temp.json

docs/.vitepress/cache
docs/.vitepress/dist

================================================
FILE: .nvmrc
================================================
v22.14.0

================================================
FILE: .vscode/settings.json
================================================
{
  "editor.formatOnSave": false,
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": "explicit"
  },
  "eslint.rules.customizations": [
    {
      "rule": "@stylistic/*",
      "fixable": true,
      "severity": "warn"
    }
  ],
  "typescript.tsdk": "node_modules/typescript/lib",
  "cSpell.words": [
    "composables",
    "tseslint",
    "Valibot",
    "vitepress"
  ],
}

================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Code of Conduct for Kitbag

As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.

We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.

Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.

This Code of Conduct is adapted from the Contributor Covenant, version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)


================================================
FILE: LICENSE
================================================
MIT License

Copyright (c) 2023-present, Craig Harshbarger

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: README.md
================================================
# @kitbag/router

Type safe router for Vue.js

[![NPM Version][npm-badge]][npm-url]
[![Netlify Status][netlify-badge]][netlify-url]
[![Discord chat][discord-badge]][discord-url]
[![Open in StackBlitz][stackblitz-badge]][stackblitz-url]

[npm-badge]: https://img.shields.io/npm/v/@kitbag/router.svg
[npm-url]: https://www.npmjs.org/package/@kitbag/router
[netlify-badge]: https://api.netlify.com/api/v1/badges/c12f79b8-49f9-4529-bc23-f8ffca8919a3/deploy-status
[netlify-url]: https://app.netlify.com/sites/kitbag-router/deploys
[discord-badge]: https://img.shields.io/discord/1079625926024900739?logo=discord&label=Discord
[discord-url]: https://discord.gg/zw7dpcc5HV
[stackblitz-badge]: https://developer.stackblitz.com/img/open_in_stackblitz_small.svg
[stackblitz-url]: https://stackblitz.com/~/github.com/kitbagjs/router-preview

<img src="https://kitbag.dev/kitbag-logo.svg" width="20%" />

## Getting Started

Get Started with our [documentation](https://kitbag-router.netlify.app/).

## Installation

Install Kitbag Router with your favorite package manager

```bash
# bun
bun add @kitbag/router
# yarn
yarn add @kitbag/router
# npm
npm install @kitbag/router
```

## Define Routes

Routes are created individually using the [`createRoute`](https://kitbag-router.netlify.app/api/functions/createRoute) utility. Learn more about [defining routes](https://kitbag-router.netlify.app/core-concepts/routes).

```ts
import { createRoute } from '@kitbag/router'

const Home = { template: '<div>Home</div>' }
const About = { template: '<div>About</div>' }

const routes = [
  createRoute({ name: 'home', path: '/', component: Home }),
  createRoute({ name: 'path', path: '/about', component: About }),
] as const
```

> [!NOTE] Type Safety
> Using `as const` when defining routes is important as it ensures the types are correctly inferred.

## Create Router

A router is created using the [`createRouter`](https://kitbag-router.netlify.app/api/functions/createRouter) utility and passing in the routes.

```ts
import { createRouter } from '@kitbag/router'

const router = createRouter(routes)
```

## Vue Plugin

Create a router instance and pass it to the app as a plugin

```ts {6}
import { createApp } from 'vue'
import App from './App.vue'

const app = createApp(App)

app.use(router)
app.mount('#app')
```

## Type Safety

Kitbag Router utilizes [declaration merging](https://www.typescriptlang.org/docs/handbook/declaration-merging.html) to provide the internal types to match the actual router you're using.

```ts
declare module '@kitbag/router' {
  interface Register {
    router: typeof router
  }
}
```

This means then when you import a component, composition, or hook from `@kitbag/router` it will be correctly typed. Alternatively, you can create your own typed router assets by using the [`createRouterAssets`](https://kitbag-router.netlify.app/api/functions/createRouterAssets) utility. This approach is especially useful for projects that use multiple routers.

## RouterView

Give your route components a place to be mounted

```html
<div class="app">
  <router-view />
</div>
```

This component can be mounted anywhere you want route components to be mounted. Nested routes can also have a nested `RouterView` which would be responsible for rendering any children that route may have. Read more about [nested routes](https://kitbag-router.netlify.app/core-concepts/routes#parent).

## RouterLink

Use RouterLink for navigating between routes.

```html
<template>
  <router-link :to="(resolve) => resolve('home')">Home</router-link>
</template>
```

### Type Safety in RouterLink

The `to` prop accepts a callback function or a [`Url`](https://kitbag-router.netlify.app/api/types/Url) string. When using a callback function, the router will provide a `resolve` function that is a type safe way to create link for your pre-defined routes.


================================================
FILE: docs/.vitepress/config.ts
================================================
import { defineConfig } from 'vitepress'
import typedocSidebar from '../api/typedoc-sidebar.json';

// https://vitepress.dev/reference/site-config
export default defineConfig({
  title: "Kitbag Router | Type safe router for Vue.js",
  description: "Type safe router for Vue.js",
  head: [
    ['link', { rel: 'icon', href: '/favicon.ico' }],
    // Vue School Top banner
    [
      'script',
      {
        src: 'https://media.bitterbrains.com/main.js?from=KITBAG&type=top',
        // @ts-expect-error: vitepress bug
        async: true,
        type: 'text/javascript',
      },
    ],
  ],
  themeConfig: {
    logo: '/kitbag-logo-circle.svg',
    siteTitle: 'Kitbag Router',

    editLink: {
      pattern: 'https://github.com/kitbagjs/router/edit/main/docs/:path',
      text: 'Suggest changes to this page',
    },
    
    nav: [
      { text: 'Guide', link: '/introduction' },
      { text: 'API', link: '/api/index' }
    ],

    search: {
      provider: 'local'
    },

    sidebar: {
      '/api/': typedocSidebar,
      '/': [
        {
          text: 'Getting Started',
          items: [
            {
              text: 'Introduction',
              link: '/introduction',
            },
            {
              text: 'Quick Start',
              link: '/quick-start',
            },
          ],
        },
        {
          text: 'Core Concepts',
          items: [
            { text: 'Routes', link: '/core-concepts/routes' },
            { text: 'External Routes', link: '/core-concepts/external-routes' },
            { text: 'Params', link: '/core-concepts/params' },
            { text: 'Props', link: '/core-concepts/component-props' },
            { text: 'Router', link: '/core-concepts/router' },
            { text: 'Router Route', link: '/core-concepts/router-route' },
            { text: 'Navigation', link: '/core-concepts/navigation' },
          ],
        },
        {
          text: 'Components',
          items: [
            { text: 'RouterView', link: '/components/router-view' },
            { text: 'RouterLink', link: '/components/router-link' },
          ],
        },
        {
          text: 'Composables',
          items: [
            { text: 'useLink', link: '/composables/useLink' },
            { text: 'useQueryValue', link: '/composables/useQueryValue' },
            { text: 'useRoute', link: '/composables/useRoute' },
            { text: 'useRouter', link: '/composables/useRouter' },
          ],
        },
        {
          text: 'Advanced Concepts',
          items: [
            { text: 'Route Matching', link: '/advanced-concepts/route-matching' },
            { text: 'Route Narrowing', link: '/advanced-concepts/route-narrowing' },
            { text: 'Rejections', link: '/advanced-concepts/rejections' },
            { text: 'Redirects', link: '/advanced-concepts/redirects' },
            { text: 'Hooks', link: '/advanced-concepts/hooks' },
            { text: 'Plugins', link: '/advanced-concepts/plugins' },
            { text: 'Route Meta', link: '/advanced-concepts/route-meta' },
            { text: 'Route State', link: '/advanced-concepts/route-state' },
            { text: 'Prefetching', link: '/advanced-concepts/prefetching' },
          ],
        },
        {
          text: "Migrating from vue-router",
          link: "/migrating-vue-router"
        }
      ]
    },

    socialLinks: [
      {
        icon: {
          svg: `<svg fill="#000000" height="800px" width="800px" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" 
          viewBox="0 0 330.242 330.242" xml:space="preserve">
       <path d="M324.442,129.811l-41.321-33.677V42.275c0-6.065-4.935-11-11-11h-26c-6.065,0-11,4.935-11,11v14.737l-55.213-44.999
         c-3.994-3.254-9.258-5.047-14.822-5.047c-5.542,0-10.781,1.782-14.753,5.019L5.8,129.81c-6.567,5.351-6.173,10.012-5.354,12.314
         c0.817,2.297,3.448,6.151,11.884,6.151h19.791v154.947c0,11.058,8.972,20.053,20,20.053h62.5c10.935,0,19.5-8.809,19.5-20.053
         v-63.541c0-5.446,5.005-10.405,10.5-10.405h42c5.238,0,9.5,4.668,9.5,10.405v63.541c0,10.87,9.388,20.053,20.5,20.053h61.5
         c11.028,0,20-8.996,20-20.053V148.275h19.791c8.436,0,11.066-3.854,11.884-6.151C330.615,139.822,331.009,135.161,324.442,129.811z"
         />
       </svg>`
        },
        link: 'https://kitbag.dev',
        ariaLabel: 'Kitbag Home'
      },
      { icon: 'github', link: 'https://github.com/kitbagjs/router' },
      { icon: 'discord', link: 'https://discord.gg/zw7dpcc5HV' },
      { icon: 'npm', link: 'https://www.npmjs.com/package/@kitbag/router' },
    ]
  },
  markdown: {
    image: {
      lazyLoading: true
    }
  }
})


================================================
FILE: docs/.vitepress/theme/index.js
================================================
import DefaultTheme from 'vitepress/theme'
import './styles/vars.css'

export default DefaultTheme

================================================
FILE: docs/.vitepress/theme/styles/vars.css
================================================
:root {
  --kitbag-orange-300: rgba(254, 168, 68, 1);
  --kitbag-orange-500: rgba(212, 80, 66, 1);
  --kitbag-orange-700: rgba(239, 31, 68, 1);
  --kitbag-orange-700-75: rgba(239, 31, 68, 0.75);

  --vp-button-brand-bg: var(--kitbag-orange-700-75);
  --vp-c-brand-1: var(--kitbag-orange-500);
  --vp-c-brand-2: var(--kitbag-orange-700);

  --vp-home-hero-name-color: transparent;
  --vp-home-hero-name-background: -webkit-linear-gradient(
    120deg,
    var(--kitbag-orange-300) 30%,
    var(--kitbag-orange-700)
  );

  --vp-home-hero-image-background-image: linear-gradient(
    -45deg,
    var(--kitbag-orange-300) 50%,
    var(--kitbag-orange-700) 50%
  );
  --vp-home-hero-image-filter: blur(40px);
}

a.alt.stackblitz {
  display: flex;
  align-items: center;
  color: rgb(19, 137, 253);
  gap: 0.2rem;
}

a.alt.stackblitz::after {
  display: block;
  height: 14px;
  width: 14px;
  content: '';
  background-image: url('/stackblitz.svg');
}

/* BitterBrains banner offset */
html.has-bb-banner.bb-type-top {
  --vp-layout-top-height: 72px;
}

html.has-bb-banner.bb-type-top.bb-banner-hidden {
  --vp-layout-top-height: 0px;
}

================================================
FILE: docs/advanced-concepts/hooks.md
================================================
# Hooks

Hooks offer a way to register callbacks on router lifecycle events.  

```ts
onAfterRouteEnter: (to, context) => {
   ...
}
```

## Lifecycle

### Before Hooks

- **onBeforeRouteEnter:** Triggered before a route gets mounted.
- **onBeforeRouteUpdate:** Triggered before a route changes. Specifically when the route changed but that parent or child didn’t.
- **onBeforeRouteLeave:** Triggered before a route is about to be unmounted

### After Hooks

- **onAfterRouteLeave:** Triggered after a route gets unmounted.
- **onAfterRouteUpdate:** Triggered after a route changes. Specifically when the route changed but that parent or child didn’t.
- **onAfterRouteEnter:** Triggered after a route is mounted

### On Error

- **onError** Triggered whenever an unexpected error is thrown. Error hooks are run in the order they were registered. The hook is provided both the error and the [error context](/advanced-concepts/hooks#error-context).

### On Rejection

- **onRejection** Triggered whenever a rejection is triggered. Rejection hooks are run in the order they were registered. The hook is provided both the rejection and the [rejection context](/advanced-concepts/hooks#rejection-context).

## Context

The router provides `to` and a `context` argument to your hook callback. The context will always include:

| Property | Description |
| ---- | ---- |
| from | What was the route prior to the hook's execution |
| push | Convenient way to move the user from wherever they were to a new route. |
| replace | Same as push, but with `options: { replace: true }`. |
| reject | Trigger a [rejection](/advanced-concepts/rejections) for the router to handle |

If the hooks lifecycle is a [before](/advanced-concepts/hooks#before-hooks) hook, you'll also have access to the following property in your context:

| Property | Description |
| ---- | ---- |
| abort | Stops the router from continuing with route change |

### Error Context

If the hook is `onError`, you'll also have access to the following properties in your context:

| Property | Description |
| ---- | ---- |
| to | What was the destination route prior to the error being thrown |
| source | String value indicating where the error occurred. Possible values are `'props'`, `'hook'`, and `'component'` |

### Rejection Context

If the hook is `onRejection`, you'll also have access to the following properties in your context:

| Property | Description |
| ---- | ---- |
| to | What was the destination route prior to the rejection being triggered |
| from | What was the route prior to the rejection being triggered |

## Levels

Hooks can be registered **globally**, on your **route**, or from within a **component**. This is useful for both providing the most convenient devx, but also can be a useful tool for ensuring proper execution order of your business logic.

### Execution Order

1. Global before hooks
2. Route before hooks
3. Component before hooks
4. Component after hooks
5. Route after hooks
6. Global after hooks

### Global

```ts
router.onAfterRouteEnter((to, context) => {
  ...
})
```

### Route

```ts
route.onAfterRouteEnter((to, context) => {
  ...
})
```

### Rejection

```ts
rejection.onRejection((rejection, context) => {
  ...
})
```

### Component

In order to register a hook from within a component, you must use the [composition API](https://vuejs.org/guide/extras/composition-api-faq.html#composition-api-faq).

```ts
import { onBeforeRouteLeave } from '@kitbag/router'

onAfterRouteEnter((to, context) => {
  ...
})
```

:::warning
You cannot register `onBeforeRouteEnter` or `onAfterRouteEnter` hooks from within a component, since the component must have been mounted to discover the hook.
:::

## Global Injection

Hooks are run within the context of the Vue app the router is installed. This means you can use vue's `inject` function to access global values.

```ts
import { inject } from 'vue'

router.onAfterRouteEnter(() => {
  const value = inject('global')

  ...
})
```


================================================
FILE: docs/advanced-concepts/plugins.md
================================================
# Plugins

Plugins are a way to extend the router with additional functionality. They are used to add routes and rejections to the router.

```ts
import { createRouterPlugin } from '@kitbag/router'

const routes = [
  createRoute({ name: 'home', path: '/' }),
] as const

const rejections = [
  createRejection({ type: 'RequiresAuth' }),
] as const

const plugin = createRouterPlugin({
  routes,
  rejections,
})
```

## Hooks

Plugins can also define global [Hooks](/advanced-concepts/hooks).

```ts
plugin.onBeforeRouteEnter(() => {
  console.log('before route enter')
})
```


================================================
FILE: docs/advanced-concepts/prefetching.md
================================================
# Prefetching

Prefetching is a powerful feature in Kitbag Router that allows your application to start loading dependencies before users navigate, improving user experience by reducing the wait time when navigating.

## Prefetching Components

When your route component is defined using `defineAsyncComponent`, Kitbag Router can start fetching that component asynchronously before it is needed.

```ts
import { defineAsyncComponent } from 'vue'

const user = createRoute({
  name: 'user',
  path: '/user/[id]',
  component: defineAsyncComponent(() => import('./UserPage.vue')), // [!code focus]
})
```

## Prefetching Props

When your route uses the [props callback](/core-concepts/component-props), Kitbag Router can start fetching your component props before they are needed.

```ts {5-9}
const user = createRoute({
  name: 'user',
  path: '/user/[id]',
  component: defineAsyncComponent(() => import('./UserPage.vue')),
}, async (({ id }) => {
  const user = await userStore.getById(id)
  return { user }
})
```

::: info
Props for routes and any parent routes are collected concurrently while components are being mounted. This avoids a waterfall from happening for async props.
:::

## How Prefetching Works

Prefetching is handled automatically when using the `router-link` component or the `useLink` composable based on the prefetch strategy determined for that specific link.

## Prefetch Strategies

The following prefetch strategies are supported:

- `eager` - Prefetch immediately when the link is rendered.
- `lazy` - Prefetch when the link is visible in the viewport.
- `intent` - Prefetch when the link is focused or hovered.

## Configuration

Prefetching can be configured at various levels. Each nested layer **overrides** the parent configuration.

- Global Configuration
- Per-Route Configuration
- Per-Link Configuration

This means that if prefetching is enabled globally, but disabled for a specific route, that route will not prefetch. Conversely, if prefetching is disabled globally, but enabled for a specific route, that route will prefetch.

Prefetching can be configured with a `boolean`, a `PrefetchStrategy`, or a `PrefetchConfigOptions` object.

::: code-group

```ts [boolean]
prefetch: true
```

```ts [PrefetchStrategy]
prefetch: 'lazy'
```

```ts [PrefetchConfigOptions]
prefetch: {
  components: 'eager',
  props: false,
}
```

:::

::: info
If the prefetch configuration is `true`, Kitbag Router will look at any overriden prefetch configs for a strategy. If no stragety is configured the default strategy `lazy` is used.
:::

### Global Configuration

By default, prefetching components is enabled and prefetching props is disabled. However, you can modify prefetching globally in your router instance by setting the `options.prefetch` property.

```ts
import { createRouter } from 'kitbag-router';

const router = createRouter({
  options: {
    prefetch: false, // all prefetching is disabled by default
  },
});
```

### Per-Route Configuration

If you want to enable or disable prefetching for specific routes, you can do so by adding a prefetch property to your route definition.

```ts
const about = createRoute({
  path: '/about',
  component: () => import('./About.vue'),
  prefetch: true, // enable prefetching for this route
})

const contact = createRoute({
  path: '/contact',
  component: () => import('./Contact.vue'),
  prefetch: false, // disable prefetching for this route
})
```

### Per-Link Configuration

You can also control prefetching at the level of individual router-links by passing a prefetch prop.

```html
<router-link to="/about" prefetch>About Us</router-link>
<router-link to="/about" prefetch="lazy">About Us</router-link>
<router-link to="/contact" :prefetch="false">Contact Us</router-link>
```

Similarly, when using the `useLink` composable, you can pass a prefetch option.

```ts
import { useLink } from 'kitbag-router';

const link = useLink({
  to: '/about',
  prefetch: true, // enable prefetching for this link
});
```


================================================
FILE: docs/advanced-concepts/redirects.md
================================================
# Redirects

Redirects provide a declarative way to automatically redirect from one route to another. This is useful for handling URL migrations or implementing redirect logic based on route parameters.

## Route Redirects

Route redirects allow you to define redirect relationships between routes. When a user navigates to a route that has a redirect configured, the router will automatically redirect them to the target route.

There are two methods available on route objects for creating redirects:

- **`redirectTo`**: Redirects the current route to another route
- **`redirectFrom`**: Redirects from another route to the current route

## Basic Usage

### Using `redirectTo`

The `redirectTo` method is called on the source route (the route you want to redirect from) and takes the destination route as an argument.

```ts
import { createRoute, createRouter } from '@kitbag/router'

const home = createRoute({
  name: 'home',
  path: '/home',
})

const dashboard = createRoute({
  name: 'dashboard',
  path: '/dashboard',
})

// Redirect from 'home' to 'dashboard'
home.redirectTo(dashboard)
```

### Using `redirectFrom`

The `redirectFrom` method is called on the destination route (the route you want to redirect to) and takes the source route as an argument.

```ts
import { createRoute, createRouter } from '@kitbag/router'

const home = createRoute({
  name: 'home',
  path: '/home',
})

const dashboard = createRoute({
  name: 'dashboard',
  path: '/dashboard',
})

// Redirect from 'home' to 'dashboard'
dashboard.redirectFrom(home)
```

Both approaches achieve the same result. Choose the one that feels more natural for your use case:
- Use `redirectTo` when you're working with the source route and want to specify where it should redirect
- Use `redirectFrom` when you're working with the destination route and want to specify which routes should redirect to it

## Parameters

When redirecting between routes with parameters, you can provide a callback function to convert parameters from the source route to the destination route.

### Converting Path Parameters

```ts
import { createRoute, createRouter } from '@kitbag/router'

const oldPost = createRoute({
  name: 'old-post',
  path: '/blog/[blogId]',
})

const newPost = createRoute({
  name: 'new-post',
  path: '/articles/[articleId]',
})

// Convert 'blogId' parameter to 'articleId'
oldPost.redirectTo(newPost, ({ blogId }) => {
  return { articleId: blogId }
})
```

## Restrictions

### One Redirect Per Route

Each route can only have one redirect configured. Attempting to configure multiple redirects for the same route will throw a `MultipleRouteRedirectsError`.

```ts
import { createRoute } from '@kitbag/router'

const routeA = createRoute({ name: 'a', path: '/a' })
const routeB = createRoute({ name: 'b', path: '/b' })
const routeC = createRoute({ name: 'c', path: '/c' })

routeA.redirectTo(routeB)

// This will throw MultipleRouteRedirectsError
routeA.redirectTo(routeC) // ❌ Error (routeA already redirects to routeB)
routeB.redirectFrom(routeA) // ❌ Error (routeA already redirects to routeB)
```


================================================
FILE: docs/advanced-concepts/rejections.md
================================================
# Rejections

Kitbag Router ships with built in support for rejection handling. Each rejection type you need is registered with a corresponding view, if rejections happen at any point in the router lifecycle the router will handle it.

## Rejection Types

Creating custom rejections is extremely easily with the [`createRejection`](/api/functions/createRejection) utility. For example, we can add a custom rejection for "AuthNeeded".

```ts
import { createRejection, createRouter } from '@kitbag/router'

const authNeededRejection = createRejection({
  type: 'AuthNeeded',
})

export const router = createRouter(routes, {
  rejections: [authNeededRejection]
})
```

## Rejection Component

When a rejection happens, Kitbag router mounts whatever component you passed in to the `component` property. If no component was assigned, Kitbag router will use the default rejection component that ships with Kitbag Router.

```ts {1,5}
import LoginView from '@/views/LoginView.vue'

const authNeededRejection = createRejection({
  type: 'AuthNeeded',
  component: LoginView,
})
```

Now if your `AuthNeeded` rejection is triggered, the `LoginView` component will be mounted.

## Built-In Rejections

Every new router has a `NotFound` rejection by default. This enables the default behavior of the router when it's given a URL that doesn't match any of your routes. Instead of the user having to define a 404/catch-all route, Kitbag router solves this problem for you.

### Overriding Built-In Rejection Components

You'll probably want to provide your own component to display to users when they end up somewhere unexpected. To override the default behavior, simply create a new rejection with the same name that includes your desired component.

```ts
import NotFoundPage from '@/components/NotFoundPage.vue'

const notFoundRejection = createRejection({
  type: 'NotFound',
  component: NotFoundPage,
})

export const router = createRouter(routes, {
  rejections: [notFoundRejection]
})
```

## Trigger Rejection

Any of the [hooks](/advanced-concepts/hooks) will provided a `reject` function in the context argument. The [async prop function](/core-concepts/component-props#async-prop-fetching) argument of `createRoute` also will provide a `reject` function.

```ts
route.onBeforeRouteEnter((to, { reject }) => {
  reject('AuthNeeded')
})
```

Alternatively, you can always trigger a rejection from `router.reject`.

```ts
import { useRouter } from '@kitbag/router'

const router = useRouter()

function maybeAuthNeeded() {
  ...
  router.reject('AuthNeeded')
}
```

### Get Rejection

Though it's uncommon, your rejection components could access to the current rejection with `useRejection` if you need it.

```ts
import { useRejection } from '@kitbag/router'

const rejection = useRejection()

const rejectionType = computed(() => rejection.value.type)
```

## Title

The `setTitle` callback is used to set the document title for the rejection. The callback is given the resolved route and a context object. The callback can be async, and should return a string that should be set as the document.title.

The context object has the following properties:

| Property | Type | Description |
| -------- | ---- | ----------- |
| from | ResolvedRoute | The route that is being navigated from. |
| getParentTitle | () => Promise<string \| undefined> | Promise that resolves to the title of the parent route. |

```ts
import { createRejection } from '@kitbag/router'

const authNeededRejection = createRejection({
  type: 'AuthNeeded',
})

authNeededRejection.setTitle((to, context) => {
  return `Unauthorized!`
})
```


================================================
FILE: docs/advanced-concepts/route-matching.md
================================================
# Route Matching

There are several rules Kitbag Router uses to determine which of your routes corresponds to the current URL.

## Named

Routes without a [name](/core-concepts/routes#name) property cannot be matched.

## External Routes

If a route is defined as [external](/core-concepts/external-routes), it will only be matched when the url is also external.

## Depth

A route’s depth is determined by the number of parent routes it has. The deeper the route, the higher the priority it has when matching.

```ts
const external = createExternalRoute({
  name: 'external',
  host: 'https://kitbag.dev',
  path: '/about-us'
})
```

:white_check_mark: `https://kitbag.dev/about-us`  
:x: `https://example.com/about-us`  
:x: `/about-us`  

## Path Matches

Routes `path` must match the structure of the URL pathname.

```ts
const route = createRoute({
  ...
  path: '/parent/anything/child'
})
```

:white_check_mark: `parent/anything/child`  
:x: `parent/123/child`  
:x: `parent//child`  
:x: `parent/child`  

```ts
const route = createRoute({
  ...
  path: '/parent/[myParam]/child'
})
```

:white_check_mark: `parent/anything/child`  
:white_check_mark: `parent/123/child`  
:x: `parent//child`  
:x: `parent/child`  

```ts
const route = createRoute({
  ...
  path: '/parent/[?myParam]/child'
})
```

:white_check_mark: `parent/anything/child`  
:white_check_mark: `parent/123/child`  
:white_check_mark: `parent//child`  
:x: `parent/child`  

## Query Matches

Routes `query` must match the structure of the URL search.

```ts
const route = createRoute({
  ...
  query: {
    foo: 'bar',
  },
})
```

:white_check_mark: `?foo=bar`  
:white_check_mark: `?kitbag=cat&foo=bar`  
:x: `?foo=123`  
:x: `?foo`  

```ts
const route = createRoute({
  ...
  query: {
    foo: String,
  },
})
```

:white_check_mark: `?foo=bar`  
:white_check_mark: `?kitbag=cat&foo=bar`  
:white_check_mark: `?foo=123`  
:x: `?foo`  

```ts
const route = createRoute({
  ...
  query: {
    '?foo': String,
  },
})
```

:white_check_mark: `?foo=bar`  
:white_check_mark: `?kitbag=cat&foo=bar`  
:white_check_mark: `?foo=123`  
:white_check_mark: `?foo`  

::: tip
when your query param is optional, the entire property can be missing and the route will still match. For the example above with query `foo=[?bar]`, the url might be `/my-route` without any query, or it might have an unrelated query `/my-route?other=value`, and still be a match because the entire foo param is optional.
:::

## Params Are Valid

Assuming a route's path and query match the structure of the URL, the last test is to make sure that values provided by the URL pass the Param parsing. By default params are assumed to be strings, so by default if structure matches, parsing will pass as well since the URL is a string. However, if you define your params with `Boolean`, `Number`, `Date`, `JSON`, or a custom `Param` the value will be need to pass the param's `get` function.

```ts
const route = createRoute({
  ...
  path: '/parent/[id]'
  query: {
    '?tab': String,
  },
})
```

:white_check_mark: `parent/123`  
:white_check_mark: `parent/123?tab=true`  
:white_check_mark: `parent/123?tab=github`  
:white_check_mark: `parent/ABC?tab=true`  

```ts
const route = createRoute({
  ...
  path: withParams('/parent/[id]', { id: Number })
  query: {
    '?tab': String,
  },
})
```

:white_check_mark: `parent/123`  
:white_check_mark: `parent/123?tab=true`  
:white_check_mark: `parent/123?tab=github`  
:x: `parent/ABC?tab=true`  

```ts
const route = createRoute({
  ...
  path: withParams('/parent/[id]', { id: Number })
  query: withParams('tab=[?tab]', { tab: Boolean })
})
```

:white_check_mark: `parent/123`  
:white_check_mark: `parent/123?tab=true`  
:x: `parent/123?tab=github`  
:x: `parent/ABC?tab=true`  


================================================
FILE: docs/advanced-concepts/route-meta.md
================================================
# Route Meta

It may be useful to store additional information about your route to be used in a hook, or within a component. Meta data might be useful for authorization, analytics, and much more. For example, below we will use route meta to configure the document title per route.

```ts
import { createRoute, createRouter } from '@kitbag/router'

const routes = [
  createRoute({ 
    name: 'home',
    path: '/',
    component: Home,
    meta: {
      pageTitle: 'Kitbag Home'
    }
  }),
  createRoute({ 
    name: 'path',
    path: '/about',
    component: About,
    meta: {
      pageTitle: 'Learn More About Kitbag'
    }
  }),
] as const

const router = createRouter(routes)

router.onAfterRouteEnter(to => {
  document.title = to.matched.meta.pageTitle
})
```

## Meta Type

Types for meta defined on individual routes will just work. If you want to require certain properties be set on all routes, you can update the global type with [declaration merging](https://www.typescriptlang.org/docs/handbook/declaration-merging.html).

```ts
declare module '@kitbag/router' {
  interface Register {
    routeMeta: {
      pageTitle?: string
    }
  }
}
```

## Cascading Meta

Meta will automatically cascade from parent routes down through child routes.

```ts
const parent = createRoute({ 
  name: 'parent',
  meta: {
    public: true
  }
})

const child = createRoute({ 
  parent,
  name: 'child',
})

// child has 'public: true'
child.meta.public
```

### Meta Property Conflict

Unlike other cascading properties like params, a child **can** also define duplicate keys in meta. However, in order for the types to be accurate child properties must match the `typeof` on the parent meta. When the router finds a duplicate key with conflicting types it will throw a [MetaPropertyConflict](/api/errors/MetaPropertyConflict) error.


================================================
FILE: docs/advanced-concepts/route-narrowing.md
================================================
# Route Narrowing

When accessing the current route or using the `useRoute` composable, by default the type is a union of all possible routes.

```ts
import { createRoute, createRouter } from '@kitbag/router'

const home = createRoute({
  name: 'home',
  path: '/',
  component: ...,
})

const user = createRoute({
  name: 'user',
  path: '/user/[userId]',
  component: ...,
})

const profile = createRoute({
  parent: user,
  name: 'user.profile',
  path: '/profile',
  query: '?tab=[tab]',
  component: ...,
})

const settings = createRoute({
  parent: user,
  name: 'user.settings',
  path: '/settings',
  component: ...,
})

const router = createRouter([home, user, profile, settings])

router.route.name // "home" | "user" | "user.profile" | "user.settings"
```

This can be narrowed like any union in Typescript, by checking the route name.

```ts
if(router.route.name === 'user') {
  router.route.name // "user"
  router.route.params // { userId: string }
}
```

You can also use the `isRoute` type guard. You could write the same logic as above like this.

```ts
import { isRoute } from '@kitbag/router'

if(isRoute(router.route, 'user', { exact: true })) {
  router.route.name // "user"
  router.route.params // { userId: string }
}
```

The `isRoute` type guard offers more flexibility with the optional `exact` argument, which defaults to `false` and will return narrow to the target route or any of it's descendants.

```ts
import { isRoute } from '@kitbag/router'

if(isRoute(router.route, 'user', { exact: false })) {
  router.route.name // "user" | "user.profile" | "user.settings"
  router.route.params // { userId: string } | { userId: string, tab: string }
}
```


================================================
FILE: docs/advanced-concepts/route-state.md
================================================
# Route State

It may be useful to store state for a given route to improve your user's experience. In situations like a form that a user might fill out, it might be useful to store form values in the [browser state](https://developer.mozilla.org/en-US/docs/Web/API/History/state) so that if the user navigates unexpectedly the values can be restored when going back. Kitbag Router extends this functionality by offering the same [param experience](/core-concepts/params#param-types) on state as well.

```ts
import { createRoute } from '@kitbag/router'

const route = createRoute({ 
  name: 'example-form',
  state: {
    email: String,
    active: Boolean,
  }
})
```

## Always Optional

State properties are always expected to be optional. The only exception to this is when your state property is defined with the `withDefault` utility.

```ts
const route = createRoute({ 
  name: 'example-form',
  state: {
    email: String,
    active: Boolean, // [!code --]
    active: withDefault(Boolean, false), // [!code ++]
  }
})
```

## Reading State

Accessing the runtime values can be found on a route's `state` property

```ts
const route = useRoute('example-form')

route.state.email
```

## Writing State

There is a `state` property on router `push` and `replace`, which can be used to set state according to the routes state params.

```ts
router.push('example-form', {}, {
  email: 'mittens@kitbag.dev',
})
```

The state values on the route are **writable**. This means that you can just modify the values directly and Kitbag Router will handle the communication with browser to update history state. You can use `route.update()` method which takes the same properties as `push()`.


================================================
FILE: docs/api/components/RouterLink.md
================================================
# Components: RouterLink

```ts
const RouterLink: RouterAssets<RegisteredRouter>["RouterLink"];
```

A component to render a link to a route or any url.

## Param

The props to pass to the router link component.

## Returns

The router link component.


================================================
FILE: docs/api/components/RouterView.md
================================================
# Components: RouterView

```ts
const RouterView: RouterAssets<RegisteredRouter>["RouterView"];
```

A component to render the current route's component.

## Param

The props to pass to the router view component.

## Returns

The router view component.


================================================
FILE: docs/api/compositions/useLink.md
================================================
# Compositions: useLink

```ts
const useLink: RouterAssets<RegisteredRouter>["useLink"];
```

A composition to export much of the functionality that drives RouterLink component.
Also exports some useful context about routes relationship to current URL and convenience methods
for navigating.

## Param

The name of the route or a valid URL.

## Param

If providing route name, this argument will expect corresponding params.

## Param

[RouterResolveOptions](../types/RouterResolveOptions.md) Same options as router resolve.

## Returns

Reactive context values for as well as navigation methods.


================================================
FILE: docs/api/compositions/useQueryValue.md
================================================
# Compositions: useQueryValue

```ts
const useQueryValue: RouterAssets<RegisteredRouter>["useQueryValue"];
```

A composition to access a specific query value from the current route.

## Returns

The query value from the router.


================================================
FILE: docs/api/compositions/useRejection.md
================================================
# Compositions: useRejection

```ts
const useRejection: RouterAssets<RegisteredRouter>["useRejection"];
```

A composition to access the rejection from the router.

## Returns

The rejection from the router.


================================================
FILE: docs/api/compositions/useRoute.md
================================================
# Compositions: useRoute

```ts
const useRoute: RouterAssets<RegisteredRouter>["useRoute"];
```

A composition to access the current route or verify a specific route name within a Vue component.
This function provides two overloads:
1. When called without arguments, it returns the current route from the router without types.
2. When called with a route name, it checks if the current active route includes the specified route name.

The function also sets up a reactive watcher on the route object from the router to continually check the validity of the route name
if provided, throwing an error if the validation fails at any point during the component's lifecycle.

## Template

A string type that should match route name of the registered router, ensuring the route name exists.

## Param

Optional. The name of the route to validate against the current active routes.

## Returns

The current router route. If a route name is provided, it validates the route name first.

## Throws

Throws an error if the provided route name is not valid or does not match the current route.


================================================
FILE: docs/api/compositions/useRouter.md
================================================
# Compositions: useRouter

```ts
const useRouter: RouterAssets<RegisteredRouter>["useRouter"];
```

A composition to access the installed router instance within a Vue component.

## Returns

The installed router instance.

## Throws

Throws an error if the router has not been installed,
        ensuring the component does not operate without routing functionality.


================================================
FILE: docs/api/errors/DuplicateParamsError.md
================================================
# Errors: DuplicateParamsError

An error thrown when duplicate parameters are detected in a route.
Param names must be unique. This includes params defined in a path
parent and params defined in the query.

## Extends

- `Error`

## Constructors

### Constructor

```ts
new DuplicateParamsError(paramName): DuplicateParamsError;
```

Constructs a new DuplicateParamsError instance with a message indicating the problematic parameter.

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `paramName` | `string` | The name of the parameter that was duplicated. |

#### Returns

`DuplicateParamsError`

#### Overrides

```ts
Error.constructor
```

## Methods

### captureStackTrace()

```ts
static captureStackTrace(targetObject, constructorOpt?): void;
```

Creates a `.stack` property on `targetObject`, which when accessed returns
a string representing the location in the code at which
`Error.captureStackTrace()` was called.

```js
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`
```

The first line of the trace will be prefixed with
`${myObject.name}: ${myObject.message}`.

The optional `constructorOpt` argument accepts a function. If given, all frames
above `constructorOpt`, including `constructorOpt`, will be omitted from the
generated stack trace.

The `constructorOpt` argument is useful for hiding implementation
details of error generation from the user. For instance:

```js
function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();
```

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `targetObject` | `object` |
| `constructorOpt?` | `Function` |

#### Returns

`void`

#### Inherited from

```ts
Error.captureStackTrace
```

***

### isError()

```ts
static isError(error): error is Error;
```

Indicates whether the argument provided is a built-in Error instance or not.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `error` | `unknown` |

#### Returns

`error is Error`

#### Inherited from

```ts
Error.isError
```

***

### prepareStackTrace()

```ts
static prepareStackTrace(err, stackTraces): any;
```

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `err` | `Error` |
| `stackTraces` | `CallSite`[] |

#### Returns

`any`

#### See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

#### Inherited from

```ts
Error.prepareStackTrace
```

## Properties

| Property | Modifier | Type | Description | Inherited from |
| ------ | ------ | ------ | ------ | ------ |
| <a id="cause"></a> `cause?` | `public` | `unknown` | - | `Error.cause` |
| <a id="message"></a> `message` | `public` | `string` | - | `Error.message` |
| <a id="name"></a> `name` | `public` | `string` | - | `Error.name` |
| <a id="stack"></a> `stack?` | `public` | `string` | - | `Error.stack` |
| <a id="stacktracelimit"></a> `stackTraceLimit` | `static` | `number` | The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. | `Error.stackTraceLimit` |


================================================
FILE: docs/api/errors/MetaPropertyConflict.md
================================================
# Errors: MetaPropertyConflict

An error thrown when a parent's meta has the same key as a child and the types are not compatible.
A child's meta can override properties of the parent, however the types must match!

## Extends

- `Error`

## Constructors

### Constructor

```ts
new MetaPropertyConflict(property?): MetaPropertyConflict;
```

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `property?` | `string` |

#### Returns

`MetaPropertyConflict`

#### Overrides

```ts
Error.constructor
```

## Methods

### captureStackTrace()

```ts
static captureStackTrace(targetObject, constructorOpt?): void;
```

Creates a `.stack` property on `targetObject`, which when accessed returns
a string representing the location in the code at which
`Error.captureStackTrace()` was called.

```js
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`
```

The first line of the trace will be prefixed with
`${myObject.name}: ${myObject.message}`.

The optional `constructorOpt` argument accepts a function. If given, all frames
above `constructorOpt`, including `constructorOpt`, will be omitted from the
generated stack trace.

The `constructorOpt` argument is useful for hiding implementation
details of error generation from the user. For instance:

```js
function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();
```

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `targetObject` | `object` |
| `constructorOpt?` | `Function` |

#### Returns

`void`

#### Inherited from

```ts
Error.captureStackTrace
```

***

### isError()

```ts
static isError(error): error is Error;
```

Indicates whether the argument provided is a built-in Error instance or not.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `error` | `unknown` |

#### Returns

`error is Error`

#### Inherited from

```ts
Error.isError
```

***

### prepareStackTrace()

```ts
static prepareStackTrace(err, stackTraces): any;
```

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `err` | `Error` |
| `stackTraces` | `CallSite`[] |

#### Returns

`any`

#### See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

#### Inherited from

```ts
Error.prepareStackTrace
```

## Properties

| Property | Modifier | Type | Description | Inherited from |
| ------ | ------ | ------ | ------ | ------ |
| <a id="cause"></a> `cause?` | `public` | `unknown` | - | `Error.cause` |
| <a id="message"></a> `message` | `public` | `string` | - | `Error.message` |
| <a id="name"></a> `name` | `public` | `string` | - | `Error.name` |
| <a id="stack"></a> `stack?` | `public` | `string` | - | `Error.stack` |
| <a id="stacktracelimit"></a> `stackTraceLimit` | `static` | `number` | The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. | `Error.stackTraceLimit` |


================================================
FILE: docs/api/errors/RouterNotInstalledError.md
================================================
# Errors: RouterNotInstalledError

An error thrown when an attempt is made to use routing functionality before the router has been installed.

## Extends

- `Error`

## Constructors

### Constructor

```ts
new RouterNotInstalledError(): RouterNotInstalledError;
```

#### Returns

`RouterNotInstalledError`

#### Overrides

```ts
Error.constructor
```

## Methods

### captureStackTrace()

```ts
static captureStackTrace(targetObject, constructorOpt?): void;
```

Creates a `.stack` property on `targetObject`, which when accessed returns
a string representing the location in the code at which
`Error.captureStackTrace()` was called.

```js
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`
```

The first line of the trace will be prefixed with
`${myObject.name}: ${myObject.message}`.

The optional `constructorOpt` argument accepts a function. If given, all frames
above `constructorOpt`, including `constructorOpt`, will be omitted from the
generated stack trace.

The `constructorOpt` argument is useful for hiding implementation
details of error generation from the user. For instance:

```js
function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();
```

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `targetObject` | `object` |
| `constructorOpt?` | `Function` |

#### Returns

`void`

#### Inherited from

```ts
Error.captureStackTrace
```

***

### isError()

```ts
static isError(error): error is Error;
```

Indicates whether the argument provided is a built-in Error instance or not.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `error` | `unknown` |

#### Returns

`error is Error`

#### Inherited from

```ts
Error.isError
```

***

### prepareStackTrace()

```ts
static prepareStackTrace(err, stackTraces): any;
```

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `err` | `Error` |
| `stackTraces` | `CallSite`[] |

#### Returns

`any`

#### See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

#### Inherited from

```ts
Error.prepareStackTrace
```

## Properties

| Property | Modifier | Type | Description | Inherited from |
| ------ | ------ | ------ | ------ | ------ |
| <a id="cause"></a> `cause?` | `public` | `unknown` | - | `Error.cause` |
| <a id="message"></a> `message` | `public` | `string` | - | `Error.message` |
| <a id="name"></a> `name` | `public` | `string` | - | `Error.name` |
| <a id="stack"></a> `stack?` | `public` | `string` | - | `Error.stack` |
| <a id="stacktracelimit"></a> `stackTraceLimit` | `static` | `number` | The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. | `Error.stackTraceLimit` |


================================================
FILE: docs/api/errors/UseRouteInvalidError.md
================================================
# Errors: UseRouteInvalidError

An error thrown when there is a mismatch between an expected route and the one actually used.

## Extends

- `Error`

## Constructors

### Constructor

```ts
new UseRouteInvalidError(routeName, actualRouteName): UseRouteInvalidError;
```

Constructs a new UseRouteInvalidError instance with a message that specifies both the given and expected route names.
This detailed error message aids in quickly identifying and resolving mismatches in route usage.

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `routeName` | `string` | The route name that was incorrectly used. |
| `actualRouteName` | `string` | The expected route name that should have been used. |

#### Returns

`UseRouteInvalidError`

#### Overrides

```ts
Error.constructor
```

## Methods

### captureStackTrace()

```ts
static captureStackTrace(targetObject, constructorOpt?): void;
```

Creates a `.stack` property on `targetObject`, which when accessed returns
a string representing the location in the code at which
`Error.captureStackTrace()` was called.

```js
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`
```

The first line of the trace will be prefixed with
`${myObject.name}: ${myObject.message}`.

The optional `constructorOpt` argument accepts a function. If given, all frames
above `constructorOpt`, including `constructorOpt`, will be omitted from the
generated stack trace.

The `constructorOpt` argument is useful for hiding implementation
details of error generation from the user. For instance:

```js
function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();
```

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `targetObject` | `object` |
| `constructorOpt?` | `Function` |

#### Returns

`void`

#### Inherited from

```ts
Error.captureStackTrace
```

***

### isError()

```ts
static isError(error): error is Error;
```

Indicates whether the argument provided is a built-in Error instance or not.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `error` | `unknown` |

#### Returns

`error is Error`

#### Inherited from

```ts
Error.isError
```

***

### prepareStackTrace()

```ts
static prepareStackTrace(err, stackTraces): any;
```

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `err` | `Error` |
| `stackTraces` | `CallSite`[] |

#### Returns

`any`

#### See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

#### Inherited from

```ts
Error.prepareStackTrace
```

## Properties

| Property | Modifier | Type | Description | Inherited from |
| ------ | ------ | ------ | ------ | ------ |
| <a id="cause"></a> `cause?` | `public` | `unknown` | - | `Error.cause` |
| <a id="message"></a> `message` | `public` | `string` | - | `Error.message` |
| <a id="name"></a> `name` | `public` | `string` | - | `Error.name` |
| <a id="stack"></a> `stack?` | `public` | `string` | - | `Error.stack` |
| <a id="stacktracelimit"></a> `stackTraceLimit` | `static` | `number` | The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. | `Error.stackTraceLimit` |


================================================
FILE: docs/api/functions/arrayOf.md
================================================
# Functions: arrayOf()

```ts
function arrayOf<T>(params, options?): ParamGetSet<ExtractParamType<T[number]>[]>;
```

## Type Parameters

| Type Parameter |
| ------ |
| `T` *extends* [`Param`](../types/Param.md)[] |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `params` | `T` |
| `options?` | `ArrayOfOptions` |

## Returns

[`ParamGetSet`](../types/ParamGetSet.md)\<`ExtractParamType`\<`T`\[`number`\]\>[]\>


================================================
FILE: docs/api/functions/asUrlString.md
================================================
# Functions: asUrlString()

```ts
function asUrlString(value): UrlString;
```

Converts a string to a valid URL.

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `value` | `string` | The string to convert. |

## Returns

[`UrlString`](../types/UrlString.md)

The valid URL.


================================================
FILE: docs/api/functions/combineRoutes.md
================================================
# Functions: combineRoutes()

```ts
function combineRoutes(parent, child): Route;
```

## Parameters

| Parameter | Type |
| ------ | ------ |
| `parent` | [`Route`](../types/Route.md) |
| `child` | [`Route`](../types/Route.md) |

## Returns

[`Route`](../types/Route.md)


================================================
FILE: docs/api/functions/createExternalRoute.md
================================================
# Functions: createExternalRoute()

## Call Signature

```ts
function createExternalRoute<TOptions>(options): ToRoute<TOptions> & ExternalRouteHooks<ToRoute<TOptions>, TOptions["context"]> & RouteRedirects<ToRoute<TOptions>>;
```

### Type Parameters

| Type Parameter |
| ------ |
| `TOptions` *extends* [`CreateRouteOptions`](../types/CreateRouteOptions.md) & [`WithHost`](../types/WithHost.md) & [`WithoutParent`](../types/WithoutParent.md) |

### Parameters

| Parameter | Type |
| ------ | ------ |
| `options` | `TOptions` |

### Returns

[`ToRoute`](../types/ToRoute.md)\<`TOptions`\> & [`ExternalRouteHooks`](../types/ExternalRouteHooks.md)\<[`ToRoute`](../types/ToRoute.md)\<`TOptions`\>, `TOptions`\[`"context"`\]\> & `RouteRedirects`\<[`ToRoute`](../types/ToRoute.md)\<`TOptions`\>\>

## Call Signature

```ts
function createExternalRoute<TOptions>(options): ToRoute<TOptions> & ExternalRouteHooks<ToRoute<TOptions>, ExtractRouteContext<TOptions>> & RouteRedirects<ToRoute<TOptions>>;
```

### Type Parameters

| Type Parameter |
| ------ |
| `TOptions` *extends* [`CreateRouteOptions`](../types/CreateRouteOptions.md) & [`WithoutHost`](../types/WithoutHost.md) & [`WithParent`](../types/WithParent.md) |

### Parameters

| Parameter | Type |
| ------ | ------ |
| `options` | `TOptions` |

### Returns

[`ToRoute`](../types/ToRoute.md)\<`TOptions`\> & [`ExternalRouteHooks`](../types/ExternalRouteHooks.md)\<[`ToRoute`](../types/ToRoute.md)\<`TOptions`\>, `ExtractRouteContext`\<`TOptions`\>\> & `RouteRedirects`\<[`ToRoute`](../types/ToRoute.md)\<`TOptions`\>\>


================================================
FILE: docs/api/functions/createParam.md
================================================
# Functions: createParam()

## Call Signature

```ts
function createParam<TParam>(param): TParam;
```

### Type Parameters

| Type Parameter |
| ------ |
| `TParam` *extends* `Required`\<[`ParamGetSet`](../types/ParamGetSet.md)\<`unknown`\>\> |

### Parameters

| Parameter | Type |
| ------ | ------ |
| `param` | `TParam` |

### Returns

`TParam`

## Call Signature

```ts
function createParam<TParam>(param): ParamGetSet<ExtractParamType<TParam>>;
```

### Type Parameters

| Type Parameter |
| ------ |
| `TParam` *extends* [`Param`](../types/Param.md) |

### Parameters

| Parameter | Type |
| ------ | ------ |
| `param` | `TParam` |

### Returns

[`ParamGetSet`](../types/ParamGetSet.md)\<`ExtractParamType`\<`TParam`\>\>

## Call Signature

```ts
function createParam<TParam>(param, defaultValue): ParamWithDefault<TParam>;
```

### Type Parameters

| Type Parameter |
| ------ |
| `TParam` *extends* [`Param`](../types/Param.md) |

### Parameters

| Parameter | Type |
| ------ | ------ |
| `param` | `TParam` |
| `defaultValue` | `NoInfer`\<`ExtractParamType`\<`TParam`\>\> |

### Returns

`ParamWithDefault`\<`TParam`\>


================================================
FILE: docs/api/functions/createRejection.md
================================================
# Functions: createRejection()

```ts
function createRejection<TType>(options): Rejection<TType>;
```

## Type Parameters

| Type Parameter |
| ------ |
| `TType` *extends* `string` |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `options` | \{ `component?`: `Component`; `type`: `TType`; \} |
| `options.component?` | `Component` |
| `options.type` | `TType` |

## Returns

`Rejection`\<`TType`\>


================================================
FILE: docs/api/functions/createRoute.md
================================================
# Functions: createRoute()

```ts
function createRoute<TOptions, TProps>(options, ...args): ToRoute<TOptions, TProps> & InternalRouteHooks<ToRoute<TOptions>, ExtractRouteContext<TOptions>> & RouteRedirects<ToRoute<TOptions>>;
```

## Type Parameters

| Type Parameter |
| ------ |
| `TOptions` *extends* [`CreateRouteOptions`](../types/CreateRouteOptions.md) |
| `TProps` *extends* \| [`PropsGetter`](../types/PropsGetter.md)\<`TOptions`, `any`\[`any`\]\> \| `RoutePropsRecord`\<`TOptions`, `any`\[`any`\]\> \| [`RouterViewPropsGetter`](../types/RouterViewPropsGetter.md)\<`TOptions`\> |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `options` | `TOptions` |
| ...`args` | `CreateRouteWithProps`\<`TOptions`, `TProps`\> |

## Returns

[`ToRoute`](../types/ToRoute.md)\<`TOptions`, `TProps`\> & [`InternalRouteHooks`](../types/InternalRouteHooks.md)\<[`ToRoute`](../types/ToRoute.md)\<`TOptions`\>, `ExtractRouteContext`\<`TOptions`\>\> & `RouteRedirects`\<[`ToRoute`](../types/ToRoute.md)\<`TOptions`\>\>


================================================
FILE: docs/api/functions/createRouter.md
================================================
# Functions: createRouter()

## Call Signature

```ts
function createRouter<TRoutes, TOptions, TPlugin>(
   routes, 
   options?, 
plugins?): Router<TRoutes, TOptions, TPlugin>;
```

Creates a router instance for a Vue application, equipped with methods for route handling, lifecycle hooks, and state management.

### Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](../types/Routes.md) | - |
| `TOptions` *extends* [`RouterOptions`](../types/RouterOptions.md) | `object` |
| `TPlugin` *extends* [`RouterPlugin`](../types/RouterPlugin.md) | [`EmptyRouterPlugin`](../types/EmptyRouterPlugin.md) |

### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `routes` | `TRoutes` | [Routes](../types/Routes.md) An array of route definitions specifying the configuration of routes in the application. Use createRoute method to create the route definitions. |
| `options?` | `TOptions` | [RouterOptions](../types/RouterOptions.md) for the router, including history mode and initial URL settings. |
| `plugins?` | `TPlugin`[] | - |

### Returns

[`Router`](../types/Router.md)\<`TRoutes`, `TOptions`, `TPlugin`\>

Router instance

### Example

```ts
import { createRoute, createRouter } from '@kitbag/router'

const Home = { template: '<div>Home</div>' }
const About = { template: '<div>About</div>' }

export const routes = [
  createRoute({ name: 'home', path: '/', component: Home }),
  createRoute({ name: 'path', path: '/about', component: About }),
] as const

const router = createRouter(routes)
```

## Call Signature

```ts
function createRouter<TRoutes, TOptions, TPlugin>(
   routes, 
   options?, 
plugins?): Router<TRoutes, TOptions, TPlugin>;
```

Creates a router instance for a Vue application, equipped with methods for route handling, lifecycle hooks, and state management.

### Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](../types/Routes.md) | - |
| `TOptions` *extends* [`RouterOptions`](../types/RouterOptions.md) | `object` |
| `TPlugin` *extends* [`RouterPlugin`](../types/RouterPlugin.md) | [`EmptyRouterPlugin`](../types/EmptyRouterPlugin.md) |

### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `routes` | `TRoutes`[] | [Routes](../types/Routes.md) An array of route definitions specifying the configuration of routes in the application. Use createRoute method to create the route definitions. |
| `options?` | `TOptions` | [RouterOptions](../types/RouterOptions.md) for the router, including history mode and initial URL settings. |
| `plugins?` | `TPlugin`[] | - |

### Returns

[`Router`](../types/Router.md)\<`TRoutes`, `TOptions`, `TPlugin`\>

Router instance

### Example

```ts
import { createRoute, createRouter } from '@kitbag/router'

const Home = { template: '<div>Home</div>' }
const About = { template: '<div>About</div>' }

export const routes = [
  createRoute({ name: 'home', path: '/', component: Home }),
  createRoute({ name: 'path', path: '/about', component: About }),
] as const

const router = createRouter(routes)
```


================================================
FILE: docs/api/functions/createRouterAssets.md
================================================
# Functions: createRouterAssets()

## Call Signature

```ts
function createRouterAssets<TRouter>(router): RouterAssets<TRouter>;
```

### Type Parameters

| Type Parameter |
| ------ |
| `TRouter` *extends* [`Router`](../types/Router.md) |

### Parameters

| Parameter | Type |
| ------ | ------ |
| `router` | `TRouter` |

### Returns

[`RouterAssets`](../types/RouterAssets.md)\<`TRouter`\>

## Call Signature

```ts
function createRouterAssets<TRouter>(routerKey): RouterAssets<TRouter>;
```

### Type Parameters

| Type Parameter |
| ------ |
| `TRouter` *extends* [`Router`](../types/Router.md) |

### Parameters

| Parameter | Type |
| ------ | ------ |
| `routerKey` | `InjectionKey`\<`TRouter`\> |

### Returns

[`RouterAssets`](../types/RouterAssets.md)\<`TRouter`\>


================================================
FILE: docs/api/functions/createRouterPlugin.md
================================================
# Functions: createRouterPlugin()

```ts
function createRouterPlugin<TRoutes, TRejections>(plugin): RouterPlugin<TRoutes, TRejections> & PluginRouteHooks<TRoutes, TRejections>;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](../types/Routes.md) | [`Routes`](../types/Routes.md) |
| `TRejections` *extends* `Rejections` | `Rejections` |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `plugin` | [`CreateRouterPluginOptions`](../types/CreateRouterPluginOptions.md)\<`TRoutes`, `TRejections`\> |

## Returns

[`RouterPlugin`](../types/RouterPlugin.md)\<`TRoutes`, `TRejections`\> & [`PluginRouteHooks`](../types/PluginRouteHooks.md)\<`TRoutes`, `TRejections`\>


================================================
FILE: docs/api/functions/createUrl.md
================================================
# Functions: createUrl()

```ts
function createUrl<T>(options): ToUrl<T>;
```

## Type Parameters

| Type Parameter |
| ------ |
| `T` *extends* [`CreateUrlOptions`](../types/CreateUrlOptions.md) |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `options` | `T` |

## Returns

[`ToUrl`](../types/ToUrl.md)\<`T`\>


================================================
FILE: docs/api/functions/isUrlWithSchema.md
================================================
# Functions: isUrlWithSchema()

```ts
function isUrlWithSchema(url): url is Url<UrlParams> & { schema: Record<string, UrlPart> };
```

**`Internal`**

Type guard to assert that a url has a schema.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `url` | `unknown` |

## Returns

`url is Url<UrlParams> & { schema: Record<string, UrlPart> }`


================================================
FILE: docs/api/functions/isWithComponent.md
================================================
# Functions: isWithComponent()

```ts
function isWithComponent<T>(options): options is T & { component: Component };
```

## Type Parameters

| Type Parameter |
| ------ |
| `T` *extends* `Record`\<`string`, `unknown`\> |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `options` | `T` |

## Returns

`options is T & { component: Component }`


================================================
FILE: docs/api/functions/isWithComponentProps.md
================================================
# Functions: isWithComponentProps()

```ts
function isWithComponentProps<T>(options): options is T & { props: PropsGetter };
```

## Type Parameters

| Type Parameter |
| ------ |
| `T` *extends* `Record`\<`string`, `unknown`\> |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `options` | `T` |

## Returns

`options is T & { props: PropsGetter }`


================================================
FILE: docs/api/functions/isWithComponentPropsRecord.md
================================================
# Functions: isWithComponentPropsRecord()

```ts
function isWithComponentPropsRecord<T>(options): options is T & { props: RoutePropsRecord };
```

## Type Parameters

| Type Parameter |
| ------ |
| `T` *extends* `Record`\<`string`, `unknown`\> |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `options` | `T` |

## Returns

`options is T & { props: RoutePropsRecord }`


================================================
FILE: docs/api/functions/isWithComponents.md
================================================
# Functions: isWithComponents()

```ts
function isWithComponents<T>(options): options is T & { components: Record<string, Component> };
```

## Type Parameters

| Type Parameter |
| ------ |
| `T` *extends* `Record`\<`string`, `unknown`\> |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `options` | `T` |

## Returns

`options is T & { components: Record<string, Component> }`


================================================
FILE: docs/api/functions/isWithParent.md
================================================
# Functions: isWithParent()

```ts
function isWithParent<T>(options): options is T & WithParent<Route>;
```

## Type Parameters

| Type Parameter |
| ------ |
| `T` *extends* `Record`\<`string`, `unknown`\> |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `options` | `T` |

## Returns

`options is T & WithParent<Route>`


================================================
FILE: docs/api/functions/literal.md
================================================
# Functions: literal()

```ts
function literal<T>(value): ParamGetSet<T>;
```

## Type Parameters

| Type Parameter |
| ------ |
| `T` *extends* [`LiteralParam`](../types/LiteralParam.md) |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `value` | `T` |

## Returns

[`ParamGetSet`](../types/ParamGetSet.md)\<`T`\>


================================================
FILE: docs/api/functions/tupleOf.md
================================================
# Functions: tupleOf()

```ts
function tupleOf<T>(params, options?): ParamGetSet<TupleOf<T>>;
```

## Type Parameters

| Type Parameter |
| ------ |
| `T` *extends* [`Param`](../types/Param.md)[] |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `params` | `T` |
| `options?` | `TupleOfOptions` |

## Returns

[`ParamGetSet`](../types/ParamGetSet.md)\<`TupleOf`\<`T`\>\>


================================================
FILE: docs/api/functions/unionOf.md
================================================
# Functions: unionOf()

```ts
function unionOf<T>(params): ParamGetSet<ExtractParamType<T[number]>>;
```

## Type Parameters

| Type Parameter |
| ------ |
| `T` *extends* [`Param`](../types/Param.md)[] |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `params` | `T` |

## Returns

[`ParamGetSet`](../types/ParamGetSet.md)\<`ExtractParamType`\<`T`\[`number`\]\>\>


================================================
FILE: docs/api/functions/withDefault.md
================================================
# Functions: withDefault()

```ts
function withDefault<TParam>(param, defaultValue): ParamWithDefault<TParam>;
```

## Type Parameters

| Type Parameter |
| ------ |
| `TParam` *extends* [`Param`](../types/Param.md) |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `param` | `TParam` |
| `defaultValue` | `ExtractParamType`\<`TParam`\> |

## Returns

`ParamWithDefault`\<`TParam`\>


================================================
FILE: docs/api/functions/withParams.md
================================================
# Functions: withParams()

## Call Signature

```ts
function withParams<TValue, TParams>(value, params): UrlPart<WithParamsParamsOutput<TValue, TParams>>;
```

### Type Parameters

| Type Parameter |
| ------ |
| `TValue` *extends* `string` |
| `TParams` *extends* `MakeOptional`\<`WithParamsParamsInput`\<`TValue`\>\> |

### Parameters

| Parameter | Type |
| ------ | ------ |
| `value` | `TValue` |
| `params` | `TParams` |

### Returns

`UrlPart`\<`WithParamsParamsOutput`\<`TValue`, `TParams`\>\>

## Call Signature

```ts
function withParams(): UrlPart<{
}>;
```

### Returns

`UrlPart`\<\{
\}\>


================================================
FILE: docs/api/hooks/onAfterRouteLeave.md
================================================
# Hooks: onAfterRouteLeave

```ts
const onAfterRouteLeave: RouterAssets<RegisteredRouter>["onAfterRouteLeave"];
```

Registers a hook that is called after a route has been left. Must be called during setup.
This can be used for cleanup actions after the component is no longer active, ensuring proper resource management.

## Param

The hook callback function

## Returns

A function that removes the added hook.


================================================
FILE: docs/api/hooks/onAfterRouteUpdate.md
================================================
# Hooks: onAfterRouteUpdate

```ts
const onAfterRouteUpdate: RouterAssets<RegisteredRouter>["onAfterRouteUpdate"];
```

Registers a hook that is called after a route has been updated. Must be called during setup.
This is ideal for responding to updates within the same route, such as parameter changes, without full component reloads.

## Param

The hook callback function

## Returns

A function that removes the added hook.


================================================
FILE: docs/api/hooks/onBeforeRouteLeave.md
================================================
# Hooks: onBeforeRouteLeave

```ts
const onBeforeRouteLeave: RouterAssets<RegisteredRouter>["onBeforeRouteLeave"];
```

Registers a hook that is called before a route is left. Must be called from setup.
This is useful for performing actions or cleanups before navigating away from a route component.

## Param

The hook callback function

## Returns

A function that removes the added hook.


================================================
FILE: docs/api/hooks/onBeforeRouteUpdate.md
================================================
# Hooks: onBeforeRouteUpdate

```ts
const onBeforeRouteUpdate: RouterAssets<RegisteredRouter>["onBeforeRouteUpdate"];
```

Registers a hook that is called before a route is updated. Must be called from setup.
This is particularly useful for handling changes in route parameters or query while staying within the same component.

## Param

The hook callback function

## Returns

A function that removes the added hook.


================================================
FILE: docs/api/index.md
================================================
# @kitbag/router

## Compositions

- [useLink](compositions/useLink.md)
- [useQueryValue](compositions/useQueryValue.md)
- [useRejection](compositions/useRejection.md)
- [useRoute](compositions/useRoute.md)
- [useRouter](compositions/useRouter.md)

## Errors

- [DuplicateParamsError](errors/DuplicateParamsError.md)
- [MetaPropertyConflict](errors/MetaPropertyConflict.md)
- [RouterNotInstalledError](errors/RouterNotInstalledError.md)
- [UseRouteInvalidError](errors/UseRouteInvalidError.md)

## Interfaces

- [Register](interfaces/Register.md)

## Type Guards

- [isRoute](type-guards/isRoute.md)
- [isUrlString](type-guards/isUrlString.md)

## Components

- [RouterLink](components/RouterLink.md)
- [RouterView](components/RouterView.md)

## Functions

- [arrayOf](functions/arrayOf.md)
- [asUrlString](functions/asUrlString.md)
- [combineRoutes](functions/combineRoutes.md)
- [createExternalRoute](functions/createExternalRoute.md)
- [createParam](functions/createParam.md)
- [createRejection](functions/createRejection.md)
- [createRoute](functions/createRoute.md)
- [createRouter](functions/createRouter.md)
- [createRouterAssets](functions/createRouterAssets.md)
- [createRouterPlugin](functions/createRouterPlugin.md)
- [createUrl](functions/createUrl.md)
- [isUrlWithSchema](functions/isUrlWithSchema.md)
- [isWithComponent](functions/isWithComponent.md)
- [isWithComponentProps](functions/isWithComponentProps.md)
- [isWithComponentPropsRecord](functions/isWithComponentPropsRecord.md)
- [isWithComponents](functions/isWithComponents.md)
- [isWithParent](functions/isWithParent.md)
- [literal](functions/literal.md)
- [tupleOf](functions/tupleOf.md)
- [unionOf](functions/unionOf.md)
- [withDefault](functions/withDefault.md)
- [withParams](functions/withParams.md)

## Hooks

- [onAfterRouteLeave](hooks/onAfterRouteLeave.md)
- [onAfterRouteUpdate](hooks/onAfterRouteUpdate.md)
- [onBeforeRouteLeave](hooks/onBeforeRouteLeave.md)
- [onBeforeRouteUpdate](hooks/onBeforeRouteUpdate.md)

## Types

- [AddAfterEnterHook](types/AddAfterEnterHook.md)
- [AddAfterLeaveHook](types/AddAfterLeaveHook.md)
- [AddAfterUpdateHook](types/AddAfterUpdateHook.md)
- [AddBeforeEnterHook](types/AddBeforeEnterHook.md)
- [AddBeforeLeaveHook](types/AddBeforeLeaveHook.md)
- [AddBeforeUpdateHook](types/AddBeforeUpdateHook.md)
- [AddComponentHook](types/AddComponentHook.md)
- [AddErrorHook](types/AddErrorHook.md)
- [AddGlobalHooks](types/AddGlobalHooks.md)
- [AddPluginErrorHook](types/AddPluginErrorHook.md)
- [AfterEnterHook](types/AfterEnterHook.md)
- [AfterEnterHookContext](types/AfterEnterHookContext.md)
- [AfterHookLifecycle](types/AfterHookLifecycle.md)
- [AfterHookResponse](types/AfterHookResponse.md)
- [AfterHookRunner](types/AfterHookRunner.md)
- [AfterLeaveHook](types/AfterLeaveHook.md)
- [AfterLeaveHookContext](types/AfterLeaveHookContext.md)
- [AfterUpdateHook](types/AfterUpdateHook.md)
- [AfterUpdateHookContext](types/AfterUpdateHookContext.md)
- [BeforeEnterHook](types/BeforeEnterHook.md)
- [BeforeEnterHookContext](types/BeforeEnterHookContext.md)
- [BeforeHookLifecycle](types/BeforeHookLifecycle.md)
- [BeforeHookResponse](types/BeforeHookResponse.md)
- [BeforeHookRunner](types/BeforeHookRunner.md)
- [BeforeLeaveHook](types/BeforeLeaveHook.md)
- [BeforeLeaveHookContext](types/BeforeLeaveHookContext.md)
- [BeforeUpdateHook](types/BeforeUpdateHook.md)
- [BeforeUpdateHookContext](types/BeforeUpdateHookContext.md)
- [ComponentHook](types/ComponentHook.md)
- [ComponentHookRegistration](types/ComponentHookRegistration.md)
- [CreatedRouteOptions](types/CreatedRouteOptions.md)
- [CreateRouteOptions](types/CreateRouteOptions.md)
- [CreateRouteProps](types/CreateRouteProps.md)
- [CreateRouterPluginOptions](types/CreateRouterPluginOptions.md)
- [CreateUrlOptions](types/CreateUrlOptions.md)
- [EmptyRouterPlugin](types/EmptyRouterPlugin.md)
- [ErrorHook](types/ErrorHook.md)
- [ErrorHookContext](types/ErrorHookContext.md)
- [ErrorHookRunner](types/ErrorHookRunner.md)
- [ErrorHookRunnerContext](types/ErrorHookRunnerContext.md)
- [ExternalRouteHooks](types/ExternalRouteHooks.md)
- [GenericRoute](types/GenericRoute.md)
- [HookLifecycle](types/HookLifecycle.md)
- [HookRemove](types/HookRemove.md)
- [HookTiming](types/HookTiming.md)
- [InternalRouteHooks](types/InternalRouteHooks.md)
- [LiteralParam](types/LiteralParam.md)
- [Param](types/Param.md)
- [ParamExtras](types/ParamExtras.md)
- [ParamGetSet](types/ParamGetSet.md)
- [ParamGetter](types/ParamGetter.md)
- [ParamSetter](types/ParamSetter.md)
- [ParseUrlOptions](types/ParseUrlOptions.md)
- [PluginAfterRouteHook](types/PluginAfterRouteHook.md)
- [PluginBeforeRouteHook](types/PluginBeforeRouteHook.md)
- [PluginErrorHook](types/PluginErrorHook.md)
- [PluginErrorHookContext](types/PluginErrorHookContext.md)
- [PluginRouteHooks](types/PluginRouteHooks.md)
- [PrefetchConfig](types/PrefetchConfig.md)
- [PrefetchConfigOptions](types/PrefetchConfigOptions.md)
- [PrefetchConfigs](types/PrefetchConfigs.md)
- [PrefetchStrategy](types/PrefetchStrategy.md)
- [PropsCallbackContext](types/PropsCallbackContext.md)
- [PropsCallbackParent](types/PropsCallbackParent.md)
- [PropsGetter](types/PropsGetter.md)
- [QuerySource](types/QuerySource.md)
- [RegisteredRouter](types/RegisteredRouter.md)
- [ResolvedRoute](types/ResolvedRoute.md)
- [ResolvedRouteUnion](types/ResolvedRouteUnion.md)
- [Route](types/Route.md)
- [RouteMeta](types/RouteMeta.md)
- [Router](types/Router.md)
- [RouterAssets](types/RouterAssets.md)
- [RouterLinkProps](types/RouterLinkProps.md)
- [RouterOptions](types/RouterOptions.md)
- [RouterPlugin](types/RouterPlugin.md)
- [RouterPush](types/RouterPush.md)
- [RouterPushOptions](types/RouterPushOptions.md)
- [RouterReject](types/RouterReject.md)
- [RouterRejections](types/RouterRejections.md)
- [RouterReplace](types/RouterReplace.md)
- [RouterReplaceOptions](types/RouterReplaceOptions.md)
- [RouterResolve](types/RouterResolve.md)
- [RouterResolvedRouteUnion](types/RouterResolvedRouteUnion.md)
- [RouterResolveOptions](types/RouterResolveOptions.md)
- [RouterRoute](types/RouterRoute.md)
- [RouterRouteName](types/RouterRouteName.md)
- [RouterRoutes](types/RouterRoutes.md)
- [RouterRouteUnion](types/RouterRouteUnion.md)
- [RouterViewPropsGetter](types/RouterViewPropsGetter.md)
- [Routes](types/Routes.md)
- [ToCallback](types/ToCallback.md)
- [ToRoute](types/ToRoute.md)
- [ToUrl](types/ToUrl.md)
- [Url](types/Url.md)
- [UrlParamsReading](types/UrlParamsReading.md)
- [UrlParamsWriting](types/UrlParamsWriting.md)
- [UrlString](types/UrlString.md)
- [UseLink](types/UseLink.md)
- [UseLinkOptions](types/UseLinkOptions.md)
- [WithHost](types/WithHost.md)
- [WithoutHost](types/WithoutHost.md)
- [WithoutParent](types/WithoutParent.md)
- [WithParent](types/WithParent.md)

## Variables

- [IS\_URL\_SYMBOL](variables/IS_URL_SYMBOL.md)


================================================
FILE: docs/api/interfaces/Register.md
================================================
# Interfaces: Register

Represents the state of currently registered router, and route meta. Used to provide correct type context for
components like `RouterLink`, as well as for composables like `useRouter`, `useRoute`, and hooks.

## Example

```ts
declare module '@kitbag/router' {
  interface Register {
    router: typeof router
    routeMeta: { public?: boolean }
  }
}
```


================================================
FILE: docs/api/type-guards/isRoute.md
================================================
# Type Guards: isRoute

```ts
const isRoute: RouterAssets<RegisteredRouter>["isRoute"];
```

A guard to verify if a route or unknown value matches a given route name.

## Param

The name of the route to check against the current route.

## Returns

True if the current route matches the given route name, false otherwise.


================================================
FILE: docs/api/type-guards/isUrlString.md
================================================
# Type Guards: isUrlString()

```ts
function isUrlString(value): value is UrlString;
```

A type guard for determining if a value is a valid URL.

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `value` | `unknown` | The value to check. |

## Returns

`value is UrlString`

`true` if the value is a valid URL, otherwise `false`.


================================================
FILE: docs/api/typedoc-sidebar.json
================================================
[
  {
    "text": "Compositions",
    "collapsed": true,
    "items": [
      {
        "text": "useLink",
        "link": "/api/compositions/useLink.md"
      },
      {
        "text": "useQueryValue",
        "link": "/api/compositions/useQueryValue.md"
      },
      {
        "text": "useRejection",
        "link": "/api/compositions/useRejection.md"
      },
      {
        "text": "useRoute",
        "link": "/api/compositions/useRoute.md"
      },
      {
        "text": "useRouter",
        "link": "/api/compositions/useRouter.md"
      }
    ]
  },
  {
    "text": "Errors",
    "collapsed": true,
    "items": [
      {
        "text": "DuplicateParamsError",
        "link": "/api/errors/DuplicateParamsError.md"
      },
      {
        "text": "MetaPropertyConflict",
        "link": "/api/errors/MetaPropertyConflict.md"
      },
      {
        "text": "RouterNotInstalledError",
        "link": "/api/errors/RouterNotInstalledError.md"
      },
      {
        "text": "UseRouteInvalidError",
        "link": "/api/errors/UseRouteInvalidError.md"
      }
    ]
  },
  {
    "text": "Interfaces",
    "collapsed": true,
    "items": [
      {
        "text": "Register",
        "link": "/api/interfaces/Register.md"
      }
    ]
  },
  {
    "text": "Type Guards",
    "collapsed": true,
    "items": [
      {
        "text": "isRoute",
        "link": "/api/type-guards/isRoute.md"
      },
      {
        "text": "isUrlString",
        "link": "/api/type-guards/isUrlString.md"
      }
    ]
  },
  {
    "text": "Components",
    "collapsed": true,
    "items": [
      {
        "text": "RouterLink",
        "link": "/api/components/RouterLink.md"
      },
      {
        "text": "RouterView",
        "link": "/api/components/RouterView.md"
      }
    ]
  },
  {
    "text": "Functions",
    "collapsed": true,
    "items": [
      {
        "text": "arrayOf",
        "link": "/api/functions/arrayOf.md"
      },
      {
        "text": "asUrlString",
        "link": "/api/functions/asUrlString.md"
      },
      {
        "text": "combineRoutes",
        "link": "/api/functions/combineRoutes.md"
      },
      {
        "text": "createExternalRoute",
        "link": "/api/functions/createExternalRoute.md"
      },
      {
        "text": "createParam",
        "link": "/api/functions/createParam.md"
      },
      {
        "text": "createRejection",
        "link": "/api/functions/createRejection.md"
      },
      {
        "text": "createRoute",
        "link": "/api/functions/createRoute.md"
      },
      {
        "text": "createRouter",
        "link": "/api/functions/createRouter.md"
      },
      {
        "text": "createRouterAssets",
        "link": "/api/functions/createRouterAssets.md"
      },
      {
        "text": "createRouterPlugin",
        "link": "/api/functions/createRouterPlugin.md"
      },
      {
        "text": "createUrl",
        "link": "/api/functions/createUrl.md"
      },
      {
        "text": "isUrlWithSchema",
        "link": "/api/functions/isUrlWithSchema.md"
      },
      {
        "text": "isWithComponent",
        "link": "/api/functions/isWithComponent.md"
      },
      {
        "text": "isWithComponentProps",
        "link": "/api/functions/isWithComponentProps.md"
      },
      {
        "text": "isWithComponentPropsRecord",
        "link": "/api/functions/isWithComponentPropsRecord.md"
      },
      {
        "text": "isWithComponents",
        "link": "/api/functions/isWithComponents.md"
      },
      {
        "text": "isWithParent",
        "link": "/api/functions/isWithParent.md"
      },
      {
        "text": "literal",
        "link": "/api/functions/literal.md"
      },
      {
        "text": "tupleOf",
        "link": "/api/functions/tupleOf.md"
      },
      {
        "text": "unionOf",
        "link": "/api/functions/unionOf.md"
      },
      {
        "text": "withDefault",
        "link": "/api/functions/withDefault.md"
      },
      {
        "text": "withParams",
        "link": "/api/functions/withParams.md"
      }
    ]
  },
  {
    "text": "Hooks",
    "collapsed": true,
    "items": [
      {
        "text": "onAfterRouteLeave",
        "link": "/api/hooks/onAfterRouteLeave.md"
      },
      {
        "text": "onAfterRouteUpdate",
        "link": "/api/hooks/onAfterRouteUpdate.md"
      },
      {
        "text": "onBeforeRouteLeave",
        "link": "/api/hooks/onBeforeRouteLeave.md"
      },
      {
        "text": "onBeforeRouteUpdate",
        "link": "/api/hooks/onBeforeRouteUpdate.md"
      }
    ]
  },
  {
    "text": "Types",
    "collapsed": true,
    "items": [
      {
        "text": "AddAfterEnterHook",
        "link": "/api/types/AddAfterEnterHook.md"
      },
      {
        "text": "AddAfterLeaveHook",
        "link": "/api/types/AddAfterLeaveHook.md"
      },
      {
        "text": "AddAfterUpdateHook",
        "link": "/api/types/AddAfterUpdateHook.md"
      },
      {
        "text": "AddBeforeEnterHook",
        "link": "/api/types/AddBeforeEnterHook.md"
      },
      {
        "text": "AddBeforeLeaveHook",
        "link": "/api/types/AddBeforeLeaveHook.md"
      },
      {
        "text": "AddBeforeUpdateHook",
        "link": "/api/types/AddBeforeUpdateHook.md"
      },
      {
        "text": "AddComponentHook",
        "link": "/api/types/AddComponentHook.md"
      },
      {
        "text": "AddErrorHook",
        "link": "/api/types/AddErrorHook.md"
      },
      {
        "text": "AddGlobalHooks",
        "link": "/api/types/AddGlobalHooks.md"
      },
      {
        "text": "AddPluginErrorHook",
        "link": "/api/types/AddPluginErrorHook.md"
      },
      {
        "text": "AfterEnterHook",
        "link": "/api/types/AfterEnterHook.md"
      },
      {
        "text": "AfterEnterHookContext",
        "link": "/api/types/AfterEnterHookContext.md"
      },
      {
        "text": "AfterHookLifecycle",
        "link": "/api/types/AfterHookLifecycle.md"
      },
      {
        "text": "AfterHookResponse",
        "link": "/api/types/AfterHookResponse.md"
      },
      {
        "text": "AfterHookRunner",
        "link": "/api/types/AfterHookRunner.md"
      },
      {
        "text": "AfterLeaveHook",
        "link": "/api/types/AfterLeaveHook.md"
      },
      {
        "text": "AfterLeaveHookContext",
        "link": "/api/types/AfterLeaveHookContext.md"
      },
      {
        "text": "AfterUpdateHook",
        "link": "/api/types/AfterUpdateHook.md"
      },
      {
        "text": "AfterUpdateHookContext",
        "link": "/api/types/AfterUpdateHookContext.md"
      },
      {
        "text": "BeforeEnterHook",
        "link": "/api/types/BeforeEnterHook.md"
      },
      {
        "text": "BeforeEnterHookContext",
        "link": "/api/types/BeforeEnterHookContext.md"
      },
      {
        "text": "BeforeHookLifecycle",
        "link": "/api/types/BeforeHookLifecycle.md"
      },
      {
        "text": "BeforeHookResponse",
        "link": "/api/types/BeforeHookResponse.md"
      },
      {
        "text": "BeforeHookRunner",
        "link": "/api/types/BeforeHookRunner.md"
      },
      {
        "text": "BeforeLeaveHook",
        "link": "/api/types/BeforeLeaveHook.md"
      },
      {
        "text": "BeforeLeaveHookContext",
        "link": "/api/types/BeforeLeaveHookContext.md"
      },
      {
        "text": "BeforeUpdateHook",
        "link": "/api/types/BeforeUpdateHook.md"
      },
      {
        "text": "BeforeUpdateHookContext",
        "link": "/api/types/BeforeUpdateHookContext.md"
      },
      {
        "text": "ComponentHook",
        "link": "/api/types/ComponentHook.md"
      },
      {
        "text": "ComponentHookRegistration",
        "link": "/api/types/ComponentHookRegistration.md"
      },
      {
        "text": "CreatedRouteOptions",
        "link": "/api/types/CreatedRouteOptions.md"
      },
      {
        "text": "CreateRouteOptions",
        "link": "/api/types/CreateRouteOptions.md"
      },
      {
        "text": "CreateRouteProps",
        "link": "/api/types/CreateRouteProps.md"
      },
      {
        "text": "CreateRouterPluginOptions",
        "link": "/api/types/CreateRouterPluginOptions.md"
      },
      {
        "text": "CreateUrlOptions",
        "link": "/api/types/CreateUrlOptions.md"
      },
      {
        "text": "EmptyRouterPlugin",
        "link": "/api/types/EmptyRouterPlugin.md"
      },
      {
        "text": "ErrorHook",
        "link": "/api/types/ErrorHook.md"
      },
      {
        "text": "ErrorHookContext",
        "link": "/api/types/ErrorHookContext.md"
      },
      {
        "text": "ErrorHookRunner",
        "link": "/api/types/ErrorHookRunner.md"
      },
      {
        "text": "ErrorHookRunnerContext",
        "link": "/api/types/ErrorHookRunnerContext.md"
      },
      {
        "text": "ExternalRouteHooks",
        "link": "/api/types/ExternalRouteHooks.md"
      },
      {
        "text": "GenericRoute",
        "link": "/api/types/GenericRoute.md"
      },
      {
        "text": "HookLifecycle",
        "link": "/api/types/HookLifecycle.md"
      },
      {
        "text": "HookRemove",
        "link": "/api/types/HookRemove.md"
      },
      {
        "text": "HookTiming",
        "link": "/api/types/HookTiming.md"
      },
      {
        "text": "InternalRouteHooks",
        "link": "/api/types/InternalRouteHooks.md"
      },
      {
        "text": "LiteralParam",
        "link": "/api/types/LiteralParam.md"
      },
      {
        "text": "Param",
        "link": "/api/types/Param.md"
      },
      {
        "text": "ParamExtras",
        "link": "/api/types/ParamExtras.md"
      },
      {
        "text": "ParamGetSet",
        "link": "/api/types/ParamGetSet.md"
      },
      {
        "text": "ParamGetter",
        "link": "/api/types/ParamGetter.md"
      },
      {
        "text": "ParamSetter",
        "link": "/api/types/ParamSetter.md"
      },
      {
        "text": "ParseUrlOptions",
        "link": "/api/types/ParseUrlOptions.md"
      },
      {
        "text": "PluginAfterRouteHook",
        "link": "/api/types/PluginAfterRouteHook.md"
      },
      {
        "text": "PluginBeforeRouteHook",
        "link": "/api/types/PluginBeforeRouteHook.md"
      },
      {
        "text": "PluginErrorHook",
        "link": "/api/types/PluginErrorHook.md"
      },
      {
        "text": "PluginErrorHookContext",
        "link": "/api/types/PluginErrorHookContext.md"
      },
      {
        "text": "PluginRouteHooks",
        "link": "/api/types/PluginRouteHooks.md"
      },
      {
        "text": "PrefetchConfig",
        "link": "/api/types/PrefetchConfig.md"
      },
      {
        "text": "PrefetchConfigOptions",
        "link": "/api/types/PrefetchConfigOptions.md"
      },
      {
        "text": "PrefetchConfigs",
        "link": "/api/types/PrefetchConfigs.md"
      },
      {
        "text": "PrefetchStrategy",
        "link": "/api/types/PrefetchStrategy.md"
      },
      {
        "text": "PropsCallbackContext",
        "link": "/api/types/PropsCallbackContext.md"
      },
      {
        "text": "PropsCallbackParent",
        "link": "/api/types/PropsCallbackParent.md"
      },
      {
        "text": "PropsGetter",
        "link": "/api/types/PropsGetter.md"
      },
      {
        "text": "QuerySource",
        "link": "/api/types/QuerySource.md"
      },
      {
        "text": "RegisteredRouter",
        "link": "/api/types/RegisteredRouter.md"
      },
      {
        "text": "ResolvedRoute",
        "link": "/api/types/ResolvedRoute.md"
      },
      {
        "text": "ResolvedRouteUnion",
        "link": "/api/types/ResolvedRouteUnion.md"
      },
      {
        "text": "Route",
        "link": "/api/types/Route.md"
      },
      {
        "text": "RouteMeta",
        "link": "/api/types/RouteMeta.md"
      },
      {
        "text": "Router",
        "link": "/api/types/Router.md"
      },
      {
        "text": "RouterAssets",
        "link": "/api/types/RouterAssets.md"
      },
      {
        "text": "RouterLinkProps",
        "link": "/api/types/RouterLinkProps.md"
      },
      {
        "text": "RouterOptions",
        "link": "/api/types/RouterOptions.md"
      },
      {
        "text": "RouterPlugin",
        "link": "/api/types/RouterPlugin.md"
      },
      {
        "text": "RouterPush",
        "link": "/api/types/RouterPush.md"
      },
      {
        "text": "RouterPushOptions",
        "link": "/api/types/RouterPushOptions.md"
      },
      {
        "text": "RouterReject",
        "link": "/api/types/RouterReject.md"
      },
      {
        "text": "RouterRejections",
        "link": "/api/types/RouterRejections.md"
      },
      {
        "text": "RouterReplace",
        "link": "/api/types/RouterReplace.md"
      },
      {
        "text": "RouterReplaceOptions",
        "link": "/api/types/RouterReplaceOptions.md"
      },
      {
        "text": "RouterResolve",
        "link": "/api/types/RouterResolve.md"
      },
      {
        "text": "RouterResolvedRouteUnion",
        "link": "/api/types/RouterResolvedRouteUnion.md"
      },
      {
        "text": "RouterResolveOptions",
        "link": "/api/types/RouterResolveOptions.md"
      },
      {
        "text": "RouterRoute",
        "link": "/api/types/RouterRoute.md"
      },
      {
        "text": "RouterRouteName",
        "link": "/api/types/RouterRouteName.md"
      },
      {
        "text": "RouterRoutes",
        "link": "/api/types/RouterRoutes.md"
      },
      {
        "text": "RouterRouteUnion",
        "link": "/api/types/RouterRouteUnion.md"
      },
      {
        "text": "RouterViewPropsGetter",
        "link": "/api/types/RouterViewPropsGetter.md"
      },
      {
        "text": "Routes",
        "link": "/api/types/Routes.md"
      },
      {
        "text": "ToCallback",
        "link": "/api/types/ToCallback.md"
      },
      {
        "text": "ToRoute",
        "link": "/api/types/ToRoute.md"
      },
      {
        "text": "ToUrl",
        "link": "/api/types/ToUrl.md"
      },
      {
        "text": "Url",
        "link": "/api/types/Url.md"
      },
      {
        "text": "UrlParamsReading",
        "link": "/api/types/UrlParamsReading.md"
      },
      {
        "text": "UrlParamsWriting",
        "link": "/api/types/UrlParamsWriting.md"
      },
      {
        "text": "UrlString",
        "link": "/api/types/UrlString.md"
      },
      {
        "text": "UseLink",
        "link": "/api/types/UseLink.md"
      },
      {
        "text": "UseLinkOptions",
        "link": "/api/types/UseLinkOptions.md"
      },
      {
        "text": "WithHost",
        "link": "/api/types/WithHost.md"
      },
      {
        "text": "WithoutHost",
        "link": "/api/types/WithoutHost.md"
      },
      {
        "text": "WithoutParent",
        "link": "/api/types/WithoutParent.md"
      },
      {
        "text": "WithParent",
        "link": "/api/types/WithParent.md"
      }
    ]
  },
  {
    "text": "Variables",
    "collapsed": true,
    "items": [
      {
        "text": "IS_URL_SYMBOL",
        "link": "/api/variables/IS_URL_SYMBOL.md"
      }
    ]
  }
]

================================================
FILE: docs/api/types/AddAfterEnterHook.md
================================================
# Types: AddAfterEnterHook()\<TRoutes, TRejections, TRouteTo, TRouteFrom\>

```ts
type AddAfterEnterHook<TRoutes, TRejections, TRouteTo, TRouteFrom> = (hook) => HookRemove;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) | [`Routes`](Routes.md) |
| `TRejections` *extends* `Rejections` | `Rejections` |
| `TRouteTo` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |
| `TRouteFrom` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `hook` | [`AfterEnterHook`](AfterEnterHook.md)\<`TRoutes`, `TRejections`, `TRouteTo`, `TRouteFrom`\> |

## Returns

[`HookRemove`](HookRemove.md)


================================================
FILE: docs/api/types/AddAfterLeaveHook.md
================================================
# Types: AddAfterLeaveHook()\<TRoutes, TRejections, TRouteTo, TRouteFrom\>

```ts
type AddAfterLeaveHook<TRoutes, TRejections, TRouteTo, TRouteFrom> = (hook) => HookRemove;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) | [`Routes`](Routes.md) |
| `TRejections` *extends* `Rejections` | `Rejections` |
| `TRouteTo` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |
| `TRouteFrom` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `hook` | [`AfterLeaveHook`](AfterLeaveHook.md)\<`TRoutes`, `TRejections`, `TRouteTo`, `TRouteFrom`\> |

## Returns

[`HookRemove`](HookRemove.md)


================================================
FILE: docs/api/types/AddAfterUpdateHook.md
================================================
# Types: AddAfterUpdateHook()\<TRoutes, TRejections, TRouteTo, TRouteFrom\>

```ts
type AddAfterUpdateHook<TRoutes, TRejections, TRouteTo, TRouteFrom> = (hook) => HookRemove;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) | [`Routes`](Routes.md) |
| `TRejections` *extends* `Rejections` | `Rejections` |
| `TRouteTo` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |
| `TRouteFrom` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `hook` | [`AfterUpdateHook`](AfterUpdateHook.md)\<`TRoutes`, `TRejections`, `TRouteTo`, `TRouteFrom`\> |

## Returns

[`HookRemove`](HookRemove.md)


================================================
FILE: docs/api/types/AddBeforeEnterHook.md
================================================
# Types: AddBeforeEnterHook()\<TRoutes, TRejections, TRouteTo, TRouteFrom\>

```ts
type AddBeforeEnterHook<TRoutes, TRejections, TRouteTo, TRouteFrom> = (hook) => HookRemove;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) | [`Routes`](Routes.md) |
| `TRejections` *extends* `Rejections` | `Rejections` |
| `TRouteTo` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |
| `TRouteFrom` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `hook` | [`BeforeEnterHook`](BeforeEnterHook.md)\<`TRoutes`, `TRejections`, `TRouteTo`, `TRouteFrom`\> |

## Returns

[`HookRemove`](HookRemove.md)


================================================
FILE: docs/api/types/AddBeforeLeaveHook.md
================================================
# Types: AddBeforeLeaveHook()\<TRoutes, TRejections, TRouteTo, TRouteFrom\>

```ts
type AddBeforeLeaveHook<TRoutes, TRejections, TRouteTo, TRouteFrom> = (hook) => HookRemove;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) | [`Routes`](Routes.md) |
| `TRejections` *extends* `Rejections` | `Rejections` |
| `TRouteTo` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |
| `TRouteFrom` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `hook` | [`BeforeLeaveHook`](BeforeLeaveHook.md)\<`TRoutes`, `TRejections`, `TRouteTo`, `TRouteFrom`\> |

## Returns

[`HookRemove`](HookRemove.md)


================================================
FILE: docs/api/types/AddBeforeUpdateHook.md
================================================
# Types: AddBeforeUpdateHook()\<TRoutes, TRejections, TRouteTo, TRouteFrom\>

```ts
type AddBeforeUpdateHook<TRoutes, TRejections, TRouteTo, TRouteFrom> = (hook) => HookRemove;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) | [`Routes`](Routes.md) |
| `TRejections` *extends* `Rejections` | `Rejections` |
| `TRouteTo` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |
| `TRouteFrom` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `hook` | [`BeforeUpdateHook`](BeforeUpdateHook.md)\<`TRoutes`, `TRejections`, `TRouteTo`, `TRouteFrom`\> |

## Returns

[`HookRemove`](HookRemove.md)


================================================
FILE: docs/api/types/AddComponentHook.md
================================================
# Types: AddComponentHook()

```ts
type AddComponentHook = (registration) => HookRemove;
```

Function to add a component route hook with depth-based condition checking.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `registration` | [`ComponentHookRegistration`](ComponentHookRegistration.md) |

## Returns

[`HookRemove`](HookRemove.md)


================================================
FILE: docs/api/types/AddErrorHook.md
================================================
# Types: AddErrorHook()\<TRoute, TRoutes, TRejections\>

```ts
type AddErrorHook<TRoute, TRoutes, TRejections> = (hook) => HookRemove;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoute` *extends* [`Route`](Route.md) | [`Route`](Route.md) |
| `TRoutes` *extends* [`Routes`](Routes.md) | [`Routes`](Routes.md) |
| `TRejections` *extends* `Rejections` | `Rejections` |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `hook` | [`ErrorHook`](ErrorHook.md)\<`TRoute`, `TRoutes`, `TRejections`\> |

## Returns

[`HookRemove`](HookRemove.md)


================================================
FILE: docs/api/types/AddGlobalHooks.md
================================================
# Types: AddGlobalHooks()

```ts
type AddGlobalHooks = (hooks) => void;
```

## Parameters

| Parameter | Type |
| ------ | ------ |
| `hooks` | `Hooks` |

## Returns

`void`


================================================
FILE: docs/api/types/AddPluginErrorHook.md
================================================
# Types: AddPluginErrorHook()\<TRoutes, TRejections\>

```ts
type AddPluginErrorHook<TRoutes, TRejections> = (hook) => HookRemove;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) | [`Routes`](Routes.md) |
| `TRejections` *extends* `Rejections` | `Rejections` |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `hook` | [`PluginErrorHook`](PluginErrorHook.md)\<`TRoutes`, `TRejections`\> |

## Returns

[`HookRemove`](HookRemove.md)


================================================
FILE: docs/api/types/AfterEnterHook.md
================================================
# Types: AfterEnterHook()\<TRoutes, TRejections, TRouteTo, TRouteFrom\>

```ts
type AfterEnterHook<TRoutes, TRejections, TRouteTo, TRouteFrom> = (to, context) => MaybePromise<void>;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) | [`Routes`](Routes.md) |
| `TRejections` *extends* `Rejections` | `Rejections` |
| `TRouteTo` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |
| `TRouteFrom` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `to` | [`ResolvedRouteUnion`](ResolvedRouteUnion.md)\<`TRouteTo`\> |
| `context` | [`AfterEnterHookContext`](AfterEnterHookContext.md)\<`TRoutes`, `TRejections`, `TRouteTo`, `TRouteFrom`\> |

## Returns

`MaybePromise`\<`void`\>


================================================
FILE: docs/api/types/AfterEnterHookContext.md
================================================
# Types: AfterEnterHookContext\<TRoutes, TRejections, TRouteTo, TRouteFrom\>

```ts
type AfterEnterHookContext<TRoutes, TRejections, TRouteTo, TRouteFrom> = AfterHookContext<TRouteTo, TRoutes, TRejections> & object;
```

## Type Declaration

### from

```ts
from: ResolvedRouteUnion<TRouteFrom> | null;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) | [`Routes`](Routes.md) |
| `TRejections` *extends* `Rejections` | `Rejections` |
| `TRouteTo` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |
| `TRouteFrom` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |


================================================
FILE: docs/api/types/AfterHookLifecycle.md
================================================
# Types: AfterHookLifecycle

```ts
type AfterHookLifecycle = "onAfterRouteEnter" | "onAfterRouteUpdate" | "onAfterRouteLeave";
```

Enumerates the lifecycle events for after route hooks.


================================================
FILE: docs/api/types/AfterHookResponse.md
================================================
# Types: AfterHookResponse

```ts
type AfterHookResponse = CallbackContextSuccess | CallbackContextPush | CallbackContextReject;
```


================================================
FILE: docs/api/types/AfterHookRunner.md
================================================
# Types: AfterHookRunner()

```ts
type AfterHookRunner = <TRoutes>(context) => Promise<AfterHookResponse>;
```

## Type Parameters

| Type Parameter |
| ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `context` | \{ `from`: \| [`RouterResolvedRouteUnion`](RouterResolvedRouteUnion.md)\<`TRoutes`\> \| `null`; `to`: [`RouterResolvedRouteUnion`](RouterResolvedRouteUnion.md)\<`TRoutes`\>; \} |
| `context.from` | \| [`RouterResolvedRouteUnion`](RouterResolvedRouteUnion.md)\<`TRoutes`\> \| `null` |
| `context.to` | [`RouterResolvedRouteUnion`](RouterResolvedRouteUnion.md)\<`TRoutes`\> |

## Returns

`Promise`\<[`AfterHookResponse`](AfterHookResponse.md)\>


================================================
FILE: docs/api/types/AfterLeaveHook.md
================================================
# Types: AfterLeaveHook()\<TRoutes, TRejections, TRouteTo, TRouteFrom\>

```ts
type AfterLeaveHook<TRoutes, TRejections, TRouteTo, TRouteFrom> = (to, context) => MaybePromise<void>;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) | [`Routes`](Routes.md) |
| `TRejections` *extends* `Rejections` | `Rejections` |
| `TRouteTo` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |
| `TRouteFrom` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `to` | [`ResolvedRouteUnion`](ResolvedRouteUnion.md)\<`TRouteTo`\> |
| `context` | [`AfterLeaveHookContext`](AfterLeaveHookContext.md)\<`TRoutes`, `TRejections`, `TRouteTo`, `TRouteFrom`\> |

## Returns

`MaybePromise`\<`void`\>


================================================
FILE: docs/api/types/AfterLeaveHookContext.md
================================================
# Types: AfterLeaveHookContext\<TRoutes, TRejections, TRouteTo, TRouteFrom\>

```ts
type AfterLeaveHookContext<TRoutes, TRejections, TRouteTo, TRouteFrom> = AfterHookContext<TRouteTo, TRoutes, TRejections> & object;
```

## Type Declaration

### from

```ts
from: ResolvedRouteUnion<TRouteFrom>;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) | [`Routes`](Routes.md) |
| `TRejections` *extends* `Rejections` | `Rejections` |
| `TRouteTo` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |
| `TRouteFrom` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |


================================================
FILE: docs/api/types/AfterUpdateHook.md
================================================
# Types: AfterUpdateHook()\<TRoutes, TRejections, TRouteTo, TRouteFrom\>

```ts
type AfterUpdateHook<TRoutes, TRejections, TRouteTo, TRouteFrom> = (to, context) => MaybePromise<void>;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) | [`Routes`](Routes.md) |
| `TRejections` *extends* `Rejections` | `Rejections` |
| `TRouteTo` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |
| `TRouteFrom` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `to` | [`ResolvedRouteUnion`](ResolvedRouteUnion.md)\<`TRouteTo`\> |
| `context` | [`AfterUpdateHookContext`](AfterUpdateHookContext.md)\<`TRoutes`, `TRejections`, `TRouteTo`, `TRouteFrom`\> |

## Returns

`MaybePromise`\<`void`\>


================================================
FILE: docs/api/types/AfterUpdateHookContext.md
================================================
# Types: AfterUpdateHookContext\<TRoutes, TRejections, TRouteTo, TRouteFrom\>

```ts
type AfterUpdateHookContext<TRoutes, TRejections, TRouteTo, TRouteFrom> = AfterHookContext<TRouteTo, TRoutes, TRejections> & object;
```

## Type Declaration

### from

```ts
from: ResolvedRouteUnion<TRouteFrom> | null;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) | [`Routes`](Routes.md) |
| `TRejections` *extends* `Rejections` | `Rejections` |
| `TRouteTo` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |
| `TRouteFrom` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |


================================================
FILE: docs/api/types/BeforeEnterHook.md
================================================
# Types: BeforeEnterHook()\<TRoutes, TRejections, TRouteTo, TRouteFrom\>

```ts
type BeforeEnterHook<TRoutes, TRejections, TRouteTo, TRouteFrom> = (to, context) => MaybePromise<void>;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) | [`Routes`](Routes.md) |
| `TRejections` *extends* `Rejections` | `Rejections` |
| `TRouteTo` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |
| `TRouteFrom` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `to` | [`ResolvedRouteUnion`](ResolvedRouteUnion.md)\<`TRouteTo`\> |
| `context` | [`BeforeEnterHookContext`](BeforeEnterHookContext.md)\<`TRoutes`, `TRejections`, `TRouteTo`, `TRouteFrom`\> |

## Returns

`MaybePromise`\<`void`\>


================================================
FILE: docs/api/types/BeforeEnterHookContext.md
================================================
# Types: BeforeEnterHookContext\<TRoutes, TRejections, TRouteTo, TRouteFrom\>

```ts
type BeforeEnterHookContext<TRoutes, TRejections, TRouteTo, TRouteFrom> = BeforeHookContext<TRouteTo, TRoutes, TRejections> & object;
```

## Type Declaration

### from

```ts
from: ResolvedRouteUnion<TRouteFrom> | null;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) | [`Routes`](Routes.md) |
| `TRejections` *extends* `Rejections` | `Rejections` |
| `TRouteTo` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |
| `TRouteFrom` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |


================================================
FILE: docs/api/types/BeforeHookLifecycle.md
================================================
# Types: BeforeHookLifecycle

```ts
type BeforeHookLifecycle = "onBeforeRouteEnter" | "onBeforeRouteUpdate" | "onBeforeRouteLeave";
```

Enumerates the lifecycle events for before route hooks.


================================================
FILE: docs/api/types/BeforeHookResponse.md
================================================
# Types: BeforeHookResponse

```ts
type BeforeHookResponse = 
  | CallbackContextSuccess
  | CallbackContextPush
  | CallbackContextReject
  | CallbackContextAbort;
```


================================================
FILE: docs/api/types/BeforeHookRunner.md
================================================
# Types: BeforeHookRunner()

```ts
type BeforeHookRunner = <TRoutes>(context) => Promise<BeforeHookResponse>;
```

## Type Parameters

| Type Parameter |
| ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `context` | \{ `from`: \| [`RouterResolvedRouteUnion`](RouterResolvedRouteUnion.md)\<`TRoutes`\> \| `null`; `to`: [`RouterResolvedRouteUnion`](RouterResolvedRouteUnion.md)\<`TRoutes`\>; \} |
| `context.from` | \| [`RouterResolvedRouteUnion`](RouterResolvedRouteUnion.md)\<`TRoutes`\> \| `null` |
| `context.to` | [`RouterResolvedRouteUnion`](RouterResolvedRouteUnion.md)\<`TRoutes`\> |

## Returns

`Promise`\<[`BeforeHookResponse`](BeforeHookResponse.md)\>


================================================
FILE: docs/api/types/BeforeLeaveHook.md
================================================
# Types: BeforeLeaveHook()\<TRoutes, TRejections, TRouteTo, TRouteFrom\>

```ts
type BeforeLeaveHook<TRoutes, TRejections, TRouteTo, TRouteFrom> = (to, context) => MaybePromise<void>;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) | [`Routes`](Routes.md) |
| `TRejections` *extends* `Rejections` | `Rejections` |
| `TRouteTo` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |
| `TRouteFrom` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `to` | [`ResolvedRouteUnion`](ResolvedRouteUnion.md)\<`TRouteTo`\> |
| `context` | [`BeforeLeaveHookContext`](BeforeLeaveHookContext.md)\<`TRoutes`, `TRejections`, `TRouteTo`, `TRouteFrom`\> |

## Returns

`MaybePromise`\<`void`\>


================================================
FILE: docs/api/types/BeforeLeaveHookContext.md
================================================
# Types: BeforeLeaveHookContext\<TRoutes, TRejections, TRouteTo, TRouteFrom\>

```ts
type BeforeLeaveHookContext<TRoutes, TRejections, TRouteTo, TRouteFrom> = BeforeHookContext<TRouteTo, TRoutes, TRejections> & object;
```

## Type Declaration

### from

```ts
from: ResolvedRouteUnion<TRouteFrom>;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) | [`Routes`](Routes.md) |
| `TRejections` *extends* `Rejections` | `Rejections` |
| `TRouteTo` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |
| `TRouteFrom` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |


================================================
FILE: docs/api/types/BeforeUpdateHook.md
================================================
# Types: BeforeUpdateHook()\<TRoutes, TRejections, TRouteTo, TRouteFrom\>

```ts
type BeforeUpdateHook<TRoutes, TRejections, TRouteTo, TRouteFrom> = (to, context) => MaybePromise<void>;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) | [`Routes`](Routes.md) |
| `TRejections` *extends* `Rejections` | `Rejections` |
| `TRouteTo` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |
| `TRouteFrom` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `to` | [`ResolvedRouteUnion`](ResolvedRouteUnion.md)\<`TRouteTo`\> |
| `context` | [`BeforeUpdateHookContext`](BeforeUpdateHookContext.md)\<`TRoutes`, `TRejections`, `TRouteTo`, `TRouteFrom`\> |

## Returns

`MaybePromise`\<`void`\>


================================================
FILE: docs/api/types/BeforeUpdateHookContext.md
================================================
# Types: BeforeUpdateHookContext\<TRoutes, TRejections, TRouteTo, TRouteFrom\>

```ts
type BeforeUpdateHookContext<TRoutes, TRejections, TRouteTo, TRouteFrom> = BeforeHookContext<TRouteTo, TRoutes, TRejections> & object;
```

## Type Declaration

### from

```ts
from: ResolvedRouteUnion<TRouteFrom> | null;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) | [`Routes`](Routes.md) |
| `TRejections` *extends* `Rejections` | `Rejections` |
| `TRouteTo` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |
| `TRouteFrom` *extends* [`Route`](Route.md) | `TRoutes`\[`number`\] |


================================================
FILE: docs/api/types/ComponentHook.md
================================================
# Types: ComponentHook

```ts
type ComponentHook = 
  | BeforeEnterHook
  | BeforeUpdateHook
  | BeforeLeaveHook
  | AfterEnterHook
  | AfterUpdateHook
  | AfterLeaveHook;
```

Union type for all component route hooks.


================================================
FILE: docs/api/types/ComponentHookRegistration.md
================================================
# Types: ComponentHookRegistration

```ts
type ComponentHookRegistration = object;
```

Registration object for adding a component route hook.

## Properties

| Property | Type |
| ------ | ------ |
| <a id="depth"></a> `depth` | `number` |
| <a id="hook"></a> `hook` | [`ComponentHook`](ComponentHook.md) |
| <a id="lifecycle"></a> `lifecycle` | [`HookLifecycle`](HookLifecycle.md) |


================================================
FILE: docs/api/types/CreateRouteOptions.md
================================================
# Types: CreateRouteOptions\<TName, TMeta\>

```ts
type CreateRouteOptions<TName, TMeta> = object;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TName` *extends* `string` \| `undefined` | `string` \| `undefined` |
| `TMeta` *extends* [`RouteMeta`](RouteMeta.md) | [`RouteMeta`](RouteMeta.md) |

## Properties

| Property | Type | Description |
| ------ | ------ | ------ |
| <a id="component"></a> `component?` | `Component` | An optional component to render when this route is matched. **Default** `RouterView` |
| <a id="components"></a> `components?` | `Record`\<`string`, `Component`\> | An object of named components to render using named views |
| <a id="context"></a> `context?` | `RouteContext`[] | Related routes and rejections for the route. The context is exposed to the hooks and props callback functions for this route. |
| <a id="hash"></a> `hash?` | `string` \| `UrlPart` | Hash part of URL. |
| <a id="meta"></a> `meta?` | `TMeta` | Represents additional metadata associated with a route, customizable via declaration merging. |
| <a id="name"></a> `name?` | `TName` | Name for route, used to create route keys and in navigation. |
| <a id="parent"></a> `parent?` | [`Route`](Route.md) | An optional parent route to nest this route under. |
| <a id="path"></a> `path?` | `string` \| `UrlPart` | Path part of URL. |
| <a id="prefetch"></a> `prefetch?` | [`PrefetchConfig`](PrefetchConfig.md) | Determines what assets are prefetched when router-link is rendered for this route. Overrides router level prefetch. |
| <a id="query"></a> `query?` | `string` \| `UrlQueryPart` | Query (aka search) part of URL. |
| <a id="state"></a> `state?` | `Record`\<`string`, [`Param`](Param.md)\> | Type params for additional data intended to be stored in history state, all keys will be optional unless a default is provided. |


================================================
FILE: docs/api/types/CreateRouteProps.md
================================================
# Types: CreateRouteProps\<TOptions\>

```ts
type CreateRouteProps<TOptions> = TOptions["component"] extends Component ? PropsGetter<TOptions, TOptions["component"]> : TOptions["components"] extends Record<string, Component> ? RoutePropsRecord<TOptions, TOptions["components"]> : RouterViewPropsGetter<TOptions>;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TOptions` *extends* [`CreateRouteOptions`](CreateRouteOptions.md) | [`CreateRouteOptions`](CreateRouteOptions.md) |


================================================
FILE: docs/api/types/CreateRouterPluginOptions.md
================================================
# Types: CreateRouterPluginOptions\<TRoutes, TRejections\>

```ts
type CreateRouterPluginOptions<TRoutes, TRejections> = object;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) | [`Routes`](Routes.md) |
| `TRejections` *extends* `Rejections` | `Rejections` |

## Properties

| Property | Type |
| ------ | ------ |
| <a id="rejections"></a> `rejections?` | `TRejections` |
| <a id="routes"></a> `routes?` | `TRoutes` |


================================================
FILE: docs/api/types/CreateUrlOptions.md
================================================
# Types: CreateUrlOptions

```ts
type CreateUrlOptions = object;
```

## Properties

| Property | Type |
| ------ | ------ |
| <a id="hash"></a> `hash?` | `string` \| `UrlPart` |
| <a id="host"></a> `host?` | `string` \| `UrlPart` |
| <a id="path"></a> `path?` | `string` \| `UrlPart` |
| <a id="query"></a> `query?` | `string` \| `UrlQueryPart` |


================================================
FILE: docs/api/types/CreatedRouteOptions.md
================================================
# Types: CreatedRouteOptions

```ts
type CreatedRouteOptions = Omit<CreateRouteOptions, "props"> & object;
```

The Route properties originally provided to `createRoute`. The only change is normalizing meta to always default to an empty object.

## Type Declaration

### id

```ts
id: string;
```

### props?

```ts
optional props: unknown;
```


================================================
FILE: docs/api/types/EmptyRouterPlugin.md
================================================
# Types: EmptyRouterPlugin

```ts
type EmptyRouterPlugin = RouterPlugin<[], []>;
```


================================================
FILE: docs/api/types/ErrorHook.md
================================================
# Types: ErrorHook()\<TRoute, TRoutes, TRejections\>

```ts
type ErrorHook<TRoute, TRoutes, TRejections> = (error, context) => void;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoute` *extends* [`Route`](Route.md) | [`Route`](Route.md) |
| `TRoutes` *extends* [`Routes`](Routes.md) | [`Routes`](Routes.md) |
| `TRejections` *extends* `Rejections` | `Rejections` |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `error` | `unknown` |
| `context` | [`ErrorHookContext`](ErrorHookContext.md)\<`TRoute`, `TRoutes`, `TRejections`\> |

## Returns

`void`


================================================
FILE: docs/api/types/ErrorHookContext.md
================================================
# Types: ErrorHookContext\<TRoute, TRoutes, TRejections\>

```ts
type ErrorHookContext<TRoute, TRoutes, TRejections> = object;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoute` *extends* [`Route`](Route.md) | [`Route`](Route.md) |
| `TRoutes` *extends* [`Routes`](Routes.md) | [`Routes`](Routes.md) |
| `TRejections` *extends* `Rejections` | `Rejections` |

## Properties

| Property | Type |
| ------ | ------ |
| <a id="from"></a> `from` | \| [`RouterResolvedRouteUnion`](RouterResolvedRouteUnion.md)\<`TRoutes`\> \| `null` |
| <a id="push"></a> `push` | [`RouterPush`](RouterPush.md)\<`TRoutes`\> |
| <a id="reject"></a> `reject` | [`RouterReject`](RouterReject.md)\<`TRejections`\> |
| <a id="replace"></a> `replace` | [`RouterReplace`](RouterReplace.md)\<`TRoutes`\> |
| <a id="source"></a> `source` | `"props"` \| `"hook"` \| `"component"` |
| <a id="to"></a> `to` | [`RouterResolvedRouteUnion`](RouterResolvedRouteUnion.md)\<`TRoutes`\> |
| <a id="update"></a> `update` | `RouteUpdate`\<[`ResolvedRoute`](ResolvedRoute.md)\<`TRoute`\>\> |


================================================
FILE: docs/api/types/ErrorHookRunner.md
================================================
# Types: ErrorHookRunner()

```ts
type ErrorHookRunner = (error, context) => void;
```

## Parameters

| Parameter | Type |
| ------ | ------ |
| `error` | `unknown` |
| `context` | [`ErrorHookRunnerContext`](ErrorHookRunnerContext.md) |

## Returns

`void`


================================================
FILE: docs/api/types/ErrorHookRunnerContext.md
================================================
# Types: ErrorHookRunnerContext\<TRoutes\>

```ts
type ErrorHookRunnerContext<TRoutes> = object;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) | [`Routes`](Routes.md) |

## Properties

| Property | Type |
| ------ | ------ |
| <a id="from"></a> `from` | \| [`RouterResolvedRouteUnion`](RouterResolvedRouteUnion.md)\<`TRoutes`\> \| `null` |
| <a id="source"></a> `source` | `"props"` \| `"hook"` |
| <a id="to"></a> `to` | [`RouterResolvedRouteUnion`](RouterResolvedRouteUnion.md)\<`TRoutes`\> |


================================================
FILE: docs/api/types/ExternalRouteHooks.md
================================================
# Types: ExternalRouteHooks\<TRoute, TContext\>

```ts
type ExternalRouteHooks<TRoute, TContext> = object;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoute` *extends* [`Route`](Route.md) | [`Route`](Route.md) |
| `TContext` *extends* `RouteContext`[] \| `undefined` | `undefined` |

## Properties

| Property | Type | Description |
| ------ | ------ | ------ |
| <a id="onbeforerouteenter"></a> `onBeforeRouteEnter` | [`AddBeforeEnterHook`](AddBeforeEnterHook.md)\<\[`TRoute`\] \| `RouteContextToRoute`\<`TContext`\>, `RouteContextToRejection`\<`TContext`\>, `TRoute`, [`Route`](Route.md)\> | Registers a route hook to be called before the route is entered. |


================================================
FILE: docs/api/types/GenericRoute.md
================================================
# Types: GenericRoute

```ts
type GenericRoute = Url & object;
```

## Type Declaration

### depth

```ts
depth: number;
```

### id

```ts
id: string;
```

### matched

```ts
matched: CreatedRouteOptions;
```

### matches

```ts
matches: CreatedRouteOptions[];
```

### meta

```ts
meta: RouteMeta;
```

### name

```ts
name: string;
```

### prefetch?

```ts
optional prefetch: PrefetchConfig;
```

### state

```ts
state: Record<string, Param>;
```


================================================
FILE: docs/api/types/HookLifecycle.md
================================================
# Types: HookLifecycle

```ts
type HookLifecycle = 
  | BeforeHookLifecycle
  | AfterHookLifecycle;
```

Union type for all route hook lifecycle events.


================================================
FILE: docs/api/types/HookRemove.md
================================================
# Types: HookRemove()

```ts
type HookRemove = () => void;
```

A function to remove a previously added route hook.

## Returns

`void`


================================================
FILE: docs/api/types/HookTiming.md
================================================
# Types: HookTiming

```ts
type HookTiming = "global" | "component";
```


================================================
FILE: docs/api/types/InternalRouteHooks.md
================================================
# Types: InternalRouteHooks\<TRoute, TContext\>

```ts
type InternalRouteHooks<TRoute, TContext> = object;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoute` *extends* [`Route`](Route.md) | [`Route`](Route.md) |
| `TContext` *extends* `RouteContext`[] | \[\] |

## Properties

| Property | Type | Description |
| ------ | ------ | ------ |
| <a id="onafterrouteenter"></a> `onAfterRouteEnter` | [`AddAfterEnterHook`](AddAfterEnterHook.md)\<\[`TRoute`\] \| `RouteContextToRoute`\<`TContext`\>, `RouteContextToRejection`\<`TContext`\>, `TRoute`, [`Route`](Route.md)\> | Registers a route hook to be called after the route is entered. |
| <a id="onafterrouteleave"></a> `onAfterRouteLeave` | [`AddAfterLeaveHook`](AddAfterLeaveHook.md)\<\[`TRoute`\] \| `RouteContextToRoute`\<`TContext`\>, `RouteContextToRejection`\<`TContext`\>, [`Route`](Route.md), `TRoute`\> | Registers a route hook to be called after the route is left. |
| <a id="onafterrouteupdate"></a> `onAfterRouteUpdate` | [`AddAfterUpdateHook`](AddAfterUpdateHook.md)\<\[`TRoute`\] \| `RouteContextToRoute`\<`TContext`\>, `RouteContextToRejection`\<`TContext`\>, `TRoute`, [`Route`](Route.md)\> | Registers a route hook to be called after the route is updated. |
| <a id="onbeforerouteenter"></a> `onBeforeRouteEnter` | [`AddBeforeEnterHook`](AddBeforeEnterHook.md)\<\[`TRoute`\] \| `RouteContextToRoute`\<`TContext`\>, `RouteContextToRejection`\<`TContext`\>, `TRoute`, [`Route`](Route.md)\> | Registers a route hook to be called before the route is entered. |
| <a id="onbeforerouteleave"></a> `onBeforeRouteLeave` | [`AddBeforeLeaveHook`](AddBeforeLeaveHook.md)\<\[`TRoute`\] \| `RouteContextToRoute`\<`TContext`\>, `RouteContextToRejection`\<`TContext`\>, [`Route`](Route.md), `TRoute`\> | Registers a route hook to be called before the route is left. |
| <a id="onbeforerouteupdate"></a> `onBeforeRouteUpdate` | [`AddBeforeUpdateHook`](AddBeforeUpdateHook.md)\<\[`TRoute`\] \| `RouteContextToRoute`\<`TContext`\>, `RouteContextToRejection`\<`TContext`\>, `TRoute`, [`Route`](Route.md)\> | Registers a route hook to be called before the route is updated. |


================================================
FILE: docs/api/types/LiteralParam.md
================================================
# Types: LiteralParam

```ts
type LiteralParam = string | number | boolean;
```


================================================
FILE: docs/api/types/Param.md
================================================
# Types: Param

```ts
type Param = 
  | ParamGetter
  | ParamGetSet
  | RegExp
  | BooleanConstructor
  | NumberConstructor
  | StringConstructor
  | DateConstructor
  | JSON
  | ZodSchemaLike
  | ValibotSchemaLike
  | LiteralParam;
```


================================================
FILE: docs/api/types/ParamExtras.md
================================================
# Types: ParamExtras

```ts
type ParamExtras = object;
```

## Properties

| Property | Type |
| ------ | ------ |
| <a id="invalid"></a> `invalid` | (`message?`) => `never` |


================================================
FILE: docs/api/types/ParamGetSet.md
================================================
# Types: ParamGetSet\<T\>

```ts
type ParamGetSet<T> = object;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `T` | `any` |

## Properties

| Property | Type |
| ------ | ------ |
| <a id="defaultvalue"></a> `defaultValue?` | `T` |
| <a id="get"></a> `get` | [`ParamGetter`](ParamGetter.md)\<`T`\> |
| <a id="set"></a> `set` | [`ParamSetter`](ParamSetter.md)\<`T`\> |


================================================
FILE: docs/api/types/ParamGetter.md
================================================
# Types: ParamGetter()\<T\>

```ts
type ParamGetter<T> = (value, extras) => T;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `T` | `any` |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `value` | `string` |
| `extras` | [`ParamExtras`](ParamExtras.md) |

## Returns

`T`


================================================
FILE: docs/api/types/ParamSetter.md
================================================
# Types: ParamSetter()\<T\>

```ts
type ParamSetter<T> = (value, extras) => string;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `T` | `any` |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `value` | `T` |
| `extras` | [`ParamExtras`](ParamExtras.md) |

## Returns

`string`


================================================
FILE: docs/api/types/ParseUrlOptions.md
================================================
# Types: ParseUrlOptions

```ts
type ParseUrlOptions = object;
```

## Properties

| Property | Type | Description |
| ------ | ------ | ------ |
| <a id="removetrailingslashes"></a> `removeTrailingSlashes?` | `boolean` | Whether to remove trailing slashes from the path. When true, trailing slashes will be removed from the path. **Default** `true` |


================================================
FILE: docs/api/types/PluginAfterRouteHook.md
================================================
# Types: PluginAfterRouteHook()\<TRoutes, TRejections\>

```ts
type PluginAfterRouteHook<TRoutes, TRejections> = (to, context) => MaybePromise<void>;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) | [`Routes`](Routes.md) |
| `TRejections` *extends* `Rejections` | `Rejections` |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `to` | [`ResolvedRoute`](ResolvedRoute.md) |
| `context` | `PluginAfterRouteHookContext`\<`TRoutes`, `TRejections`\> |

## Returns

`MaybePromise`\<`void`\>


================================================
FILE: docs/api/types/PluginBeforeRouteHook.md
================================================
# Types: PluginBeforeRouteHook()\<TRoutes, TRejections\>

```ts
type PluginBeforeRouteHook<TRoutes, TRejections> = (to, context) => MaybePromise<void>;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) | [`Routes`](Routes.md) |
| `TRejections` *extends* `Rejections` | `Rejections` |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `to` | [`ResolvedRoute`](ResolvedRoute.md) |
| `context` | `PluginBeforeRouteHookContext`\<`TRoutes`, `TRejections`\> |

## Returns

`MaybePromise`\<`void`\>


================================================
FILE: docs/api/types/PluginErrorHook.md
================================================
# Types: PluginErrorHook()\<TRoutes, TRejections\>

```ts
type PluginErrorHook<TRoutes, TRejections> = (error, context) => void;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) | [`Routes`](Routes.md) |
| `TRejections` *extends* `Rejections` | `Rejections` |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `error` | `unknown` |
| `context` | [`PluginErrorHookContext`](PluginErrorHookContext.md)\<`TRoutes`, `TRejections`\> |

## Returns

`void`


================================================
FILE: docs/api/types/PluginErrorHookContext.md
================================================
# Types: PluginErrorHookContext\<TRoutes, TRejections\>

```ts
type PluginErrorHookContext<TRoutes, TRejections> = object;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) | [`Routes`](Routes.md) |
| `TRejections` *extends* `Rejections` | `Rejections` |

## Properties

| Property | Type |
| ------ | ------ |
| <a id="from"></a> `from` | [`ResolvedRoute`](ResolvedRoute.md) \| `null` |
| <a id="push"></a> `push` | [`RouterPush`](RouterPush.md)\<`TRoutes`\> |
| <a id="reject"></a> `reject` | [`RouterReject`](RouterReject.md)\<`TRejections`\> |
| <a id="replace"></a> `replace` | [`RouterReplace`](RouterReplace.md)\<`TRoutes`\> |
| <a id="source"></a> `source` | `"props"` \| `"hook"` \| `"component"` |
| <a id="to"></a> `to` | [`ResolvedRoute`](ResolvedRoute.md) |


================================================
FILE: docs/api/types/PluginRouteHooks.md
================================================
# Types: PluginRouteHooks\<TRoutes, TRejections\>

```ts
type PluginRouteHooks<TRoutes, TRejections> = object;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) | [`Routes`](Routes.md) |
| `TRejections` *extends* `Rejections` | `Rejections` |

## Properties

| Property | Type | Description |
| ------ | ------ | ------ |
| <a id="onafterrouteenter"></a> `onAfterRouteEnter` | `AddPluginAfterRouteHook`\<`TRoutes`, `TRejections`\> | Registers a global hook to be called after a route is entered. |
| <a id="onafterrouteleave"></a> `onAfterRouteLeave` | `AddPluginAfterRouteHook`\<`TRoutes`, `TRejections`\> | Registers a global hook to be called after a route is left. |
| <a id="onafterrouteupdate"></a> `onAfterRouteUpdate` | `AddPluginAfterRouteHook`\<`TRoutes`, `TRejections`\> | Registers a global hook to be called after a route is updated. |
| <a id="onbeforerouteenter"></a> `onBeforeRouteEnter` | `AddPluginBeforeRouteHook`\<`TRoutes`, `TRejections`\> | Registers a global hook to be called before a route is entered. |
| <a id="onbeforerouteleave"></a> `onBeforeRouteLeave` | `AddPluginBeforeRouteHook`\<`TRoutes`, `TRejections`\> | Registers a global hook to be called before a route is left. |
| <a id="onbeforerouteupdate"></a> `onBeforeRouteUpdate` | `AddPluginBeforeRouteHook`\<`TRoutes`, `TRejections`\> | Registers a global hook to be called before a route is updated. |
| <a id="onerror"></a> `onError` | [`AddPluginErrorHook`](AddPluginErrorHook.md)\<`TRoutes`, `TRejections`\> | Registers a global hook to be called when an error occurs. |


================================================
FILE: docs/api/types/PrefetchConfig.md
================================================
# Types: PrefetchConfig

```ts
type PrefetchConfig = 
  | boolean
  | PrefetchStrategy
  | PrefetchConfigOptions;
```

Determines what assets are prefetched. A boolean enables or disables all prefetching.


================================================
FILE: docs/api/types/PrefetchConfigOptions.md
================================================
# Types: PrefetchConfigOptions

```ts
type PrefetchConfigOptions = object;
```

## Properties

| Property | Type | Description |
| ------ | ------ | ------ |
| <a id="components"></a> `components?` | `boolean` \| [`PrefetchStrategy`](PrefetchStrategy.md) | When true any component that is wrapped in vue's defineAsyncComponent will be prefetched **Default** `'eager'` |
| <a id="props"></a> `props?` | `boolean` \| [`PrefetchStrategy`](PrefetchStrategy.md) | When true any props for routes will be prefetched **Default** `false` |


================================================
FILE: docs/api/types/PrefetchConfigs.md
================================================
# Types: PrefetchConfigs

```ts
type PrefetchConfigs = object;
```

## Properties

| Property | Type |
| ------ | ------ |
| <a id="linkprefetch"></a> `linkPrefetch?` | [`PrefetchConfig`](PrefetchConfig.md) |
| <a id="routeprefetch"></a> `routePrefetch?` | [`PrefetchConfig`](PrefetchConfig.md) |
| <a id="routerprefetch"></a> `routerPrefetch?` | [`PrefetchConfig`](PrefetchConfig.md) |


================================================
FILE: docs/api/types/PrefetchStrategy.md
================================================
# Types: PrefetchStrategy

```ts
type PrefetchStrategy = "eager" | "lazy" | "intent";
```

Determines when assets are prefetched.
eager: Fetched immediately
lazy: Fetched when visible


================================================
FILE: docs/api/types/PropsCallbackContext.md
================================================
# Types: PropsCallbackContext\<TRoute, TOptions\>

```ts
type PropsCallbackContext<TRoute, TOptions> = object;
```

Context provided to props callback functions

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoute` *extends* [`Route`](Route.md) | [`Route`](Route.md) |
| `TOptions` *extends* [`CreateRouteOptions`](CreateRouteOptions.md) | [`CreateRouteOptions`](CreateRouteOptions.md) |

## Properties

| Property | Type |
| ------ | ------ |
| <a id="parent"></a> `parent` | [`PropsCallbackParent`](PropsCallbackParent.md)\<`TOptions`\[`"parent"`\]\> |
| <a id="push"></a> `push` | [`RouterPush`](RouterPush.md)\<\[`TRoute`\] \| `ExtractRouteContextRoutes`\<`TOptions`\>\> |
| <a id="reject"></a> `reject` | [`RouterReject`](RouterReject.md)\<`ExtractRouteContextRejections`\<`TOptions`\>\> |
| <a id="replace"></a> `replace` | [`RouterReplace`](RouterReplace.md)\<\[`TRoute`\] \| `ExtractRouteContextRoutes`\<`TOptions`\>\> |
| <a id="update"></a> `update` | `RouteUpdate`\<[`ResolvedRoute`](ResolvedRoute.md)\<`TRoute`\>\> |


================================================
FILE: docs/api/types/PropsCallbackParent.md
================================================
# Types: PropsCallbackParent\<TParent\>

```ts
type PropsCallbackParent<TParent> = Route | undefined extends TParent ? 
  | undefined
  | {
  name: string;
  props: unknown;
} : TParent extends Route ? object : undefined;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TParent` *extends* [`Route`](Route.md) \| `undefined` | [`Route`](Route.md) \| `undefined` |


================================================
FILE: docs/api/types/PropsGetter.md
================================================
# Types: PropsGetter()\<TOptions, TComponent\>

```ts
type PropsGetter<TOptions, TComponent> = (route, context) => MaybePromise<ComponentProps<TComponent>>;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TOptions` *extends* [`CreateRouteOptions`](CreateRouteOptions.md) | [`CreateRouteOptions`](CreateRouteOptions.md) |
| `TComponent` *extends* `Component` | `Component` |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `route` | [`ResolvedRoute`](ResolvedRoute.md)\<[`ToRoute`](ToRoute.md)\<`TOptions`\>\> |
| `context` | [`PropsCallbackContext`](PropsCallbackContext.md)\<[`ToRoute`](ToRoute.md)\<`TOptions`\>, `TOptions`\> |

## Returns

`MaybePromise`\<`ComponentProps`\<`TComponent`\>\>


================================================
FILE: docs/api/types/QuerySource.md
================================================
# Types: QuerySource

```ts
type QuerySource = ConstructorParameters<typeof URLSearchParams>[0];
```


================================================
FILE: docs/api/types/RegisteredRouter.md
================================================
# Types: RegisteredRouter\<T\>

```ts
type RegisteredRouter<T> = T extends object ? TRouter : Router;
```

Represents the Router property within [Register](../interfaces/Register.md)

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `T` | [`Register`](../interfaces/Register.md) |


================================================
FILE: docs/api/types/ResolvedRoute.md
================================================
# Types: ResolvedRoute\<TRoute\>

```ts
type ResolvedRoute<TRoute> = Readonly<{
  hash: string;
  hooks: Hooks[];
  href: UrlString;
  id: TRoute["id"];
  matched: TRoute["matched"];
  matches: TRoute["matches"];
  name: TRoute["name"];
  params: UrlParamsReading<TRoute>;
  query: URLSearchParams;
  state: ExtractRouteStateParamsAsOptional<TRoute["state"]>;
}>;
```

Represents a route that the router has matched to current browser location.

## Type Parameters

| Type Parameter | Default type | Description |
| ------ | ------ | ------ |
| `TRoute` *extends* [`Route`](Route.md) | [`Route`](Route.md) | Underlying Route that has been resolved. |


================================================
FILE: docs/api/types/ResolvedRouteUnion.md
================================================
# Types: ResolvedRouteUnion\<TRoute\>

```ts
type ResolvedRouteUnion<TRoute> = TRoute extends Route ? ResolvedRoute<TRoute> : never;
```

Converts a union of Route types to a union of ResolvedRoute types while preserving the discriminated union structure for narrowing.
This is useful when you have a Route union (like `TRoutes[number]`) and need it to narrow properly.
Uses a distributive conditional type to ensure unions are properly distributed.

## Type Parameters

| Type Parameter |
| ------ |
| `TRoute` *extends* [`Route`](Route.md) |

## Example

```ts
type RouteUnion = RouteA | RouteB
type ResolvedUnion = ResolvedRouteUnion<RouteUnion> // ResolvedRoute<RouteA> | ResolvedRoute<RouteB>
```


================================================
FILE: docs/api/types/Route.md
================================================
# Types: Route\<TName, TUrl, TMeta, TState, TMatches, TContext\>

```ts
type Route<TName, TUrl, TMeta, TState, TMatches, TContext> = TUrl & object;
```

Represents the structure of a route within the application. Return value of `createRoute`

## Type Declaration

### context

```ts
context: TContext;
```

Related routes and rejections for the route. The context is exposed to the hooks and props callback functions for this route.

### depth

```ts
depth: number;
```

**`Internal`**

A value that represents how many parents a route has. Used for route matching

### hooks

```ts
hooks: Hooks[];
```

**`Internal`**

The stores for routes including ancestors.
Order of routes will be from greatest ancestor to narrowest matched.

### id

```ts
id: string;
```

Unique identifier for the route, generated by router.

### matched

```ts
matched: LastInArray<TMatches, CreatedRouteOptions>;
```

The specific route properties that were matched in the current route.

### matches

```ts
matches: TMatches;
```

The specific route properties that were matched in the current route, including any ancestors.
Order of routes will be from greatest ancestor to narrowest matched.

### meta

```ts
meta: TMeta;
```

Represents additional metadata associated with a route, combined with any parents.

### name

```ts
name: TName;
```

Identifier for the route as defined by user. Name must be unique among named routes. Name is used for routing and for matching.

### prefetch?

```ts
optional prefetch: PrefetchConfig;
```

Determines what assets are prefetched when router-link is rendered for this route. Overrides router level prefetch.

### state

```ts
state: TState;
```

Represents the schema of the route state, combined with any parents.

## Type Parameters

| Type Parameter | Default type | Description |
| ------ | ------ | ------ |
| `TName` *extends* `string` | `string` | Represents the unique name identifying the route, typically a string. |
| `TUrl` *extends* [`Url`](Url.md) | [`Url`](Url.md) | - |
| `TMeta` *extends* [`RouteMeta`](RouteMeta.md) | [`RouteMeta`](RouteMeta.md) | - |
| `TState` *extends* `Record`\<`string`, [`Param`](Param.md)\> | `Record`\<`string`, [`Param`](Param.md)\> | - |
| `TMatches` *extends* [`CreatedRouteOptions`](CreatedRouteOptions.md)[] | [`CreatedRouteOptions`](CreatedRouteOptions.md)[] | - |
| `TContext` *extends* `RouteContext`[] | `RouteContext`[] | - |

## Template

The type or structure of the route's path.

## Template

The type or structure of the query parameters associated with the route.


================================================
FILE: docs/api/types/RouteMeta.md
================================================
# Types: RouteMeta\<T\>

```ts
type RouteMeta<T> = T extends object ? RouteMeta : Record<string, unknown>;
```

Represents additional metadata associated with a route, customizable via declaration merging.

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `T` | [`Register`](../interfaces/Register.md) |


================================================
FILE: docs/api/types/Router.md
================================================
# Types: Router\<TRoutes, TOptions, TPlugin\>

```ts
type Router<TRoutes, TOptions, TPlugin> = object;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) | `any` |
| `TOptions` *extends* [`RouterOptions`](RouterOptions.md) | `any` |
| `TPlugin` *extends* [`RouterPlugin`](RouterPlugin.md) | `any` |

## Properties

| Property | Type | Description |
| ------ | ------ | ------ |
| <a id="back"></a> `back` | () => `void` | Navigates to the previous entry in the browser's history stack. |
| <a id="find"></a> `find` | (`url`, `options?`) => [`ResolvedRoute`](ResolvedRoute.md) \| `undefined` | Creates a ResolvedRoute record for a given URL. |
| <a id="forward"></a> `forward` | () => `void` | Navigates to the next entry in the browser's history stack. |
| <a id="go"></a> `go` | (`delta`) => `void` | Moves the current history entry to a specific point in the history stack. |
| <a id="install"></a> `install` | (`app`) => `void` | Installs the router into a Vue application instance. |
| <a id="isexternal"></a> `isExternal` | (`url`) => `boolean` | Given a URL, returns true if host does not match host stored on router instance |
| <a id="onafterrouteenter"></a> `onAfterRouteEnter` | [`AddAfterEnterHook`](AddAfterEnterHook.md)\<`TRoutes` \| `TPlugin`\[`"routes"`\], `ExtractRejections`\<`TOptions`\> \| `ExtractRejections`\<`TPlugin`\>\> | Registers a hook to be called after a route is entered. |
| <a id="onafterrouteleave"></a> `onAfterRouteLeave` | [`AddAfterLeaveHook`](AddAfterLeaveHook.md)\<`TRoutes` \| `TPlugin`\[`"routes"`\], `ExtractRejections`\<`TOptions`\> \| `ExtractRejections`\<`TPlugin`\>\> | Registers a hook to be called after a route is left. |
| <a id="onafterrouteupdate"></a> `onAfterRouteUpdate` | [`AddAfterUpdateHook`](AddAfterUpdateHook.md)\<`TRoutes` \| `TPlugin`\[`"routes"`\], `ExtractRejections`\<`TOptions`\> \| `ExtractRejections`\<`TPlugin`\>\> | Registers a hook to be called after a route is updated. |
| <a id="onbeforerouteenter"></a> `onBeforeRouteEnter` | [`AddBeforeEnterHook`](AddBeforeEnterHook.md)\<`TRoutes` \| `TPlugin`\[`"routes"`\], `ExtractRejections`\<`TOptions`\> \| `ExtractRejections`\<`TPlugin`\>\> | Registers a hook to be called before a route is entered. |
| <a id="onbeforerouteleave"></a> `onBeforeRouteLeave` | [`AddBeforeLeaveHook`](AddBeforeLeaveHook.md)\<`TRoutes` \| `TPlugin`\[`"routes"`\], `ExtractRejections`\<`TOptions`\> \| `ExtractRejections`\<`TPlugin`\>\> | Registers a hook to be called before a route is left. |
| <a id="onbeforerouteupdate"></a> `onBeforeRouteUpdate` | [`AddBeforeUpdateHook`](AddBeforeUpdateHook.md)\<`TRoutes` \| `TPlugin`\[`"routes"`\], `ExtractRejections`\<`TOptions`\> \| `ExtractRejections`\<`TPlugin`\>\> | Registers a hook to be called before a route is updated. |
| <a id="onerror"></a> `onError` | [`AddErrorHook`](AddErrorHook.md)\<`TRoutes`\[`number`\] \| `TPlugin`\[`"routes"`\]\[`number`\], `TRoutes` \| `TPlugin`\[`"routes"`\], `ExtractRejections`\<`TOptions`\> \| `ExtractRejections`\<`TPlugin`\>\> | Registers a hook to be called when an error occurs. If the hook returns true, the error is considered handled and the other hooks are not run. If all hooks return false the error is rethrown |
| <a id="prefetch"></a> `prefetch?` | [`PrefetchConfig`](PrefetchConfig.md) | Determines what assets are prefetched. |
| <a id="push"></a> `push` | [`RouterPush`](RouterPush.md)\<`TRoutes` \| `TPlugin`\[`"routes"`\]\> | Navigates to a specified path or route object in the history stack, adding a new entry. |
| <a id="refresh"></a> `refresh` | () => `void` | Forces the router to re-evaluate the current route. |
| <a id="reject"></a> `reject` | [`RouterReject`](RouterReject.md)\<\[`...ExtractRejections<TOptions>`, `...ExtractRejections<TPlugin>`\]\> | Handles route rejection based on a specified rejection type. |
| <a id="replace"></a> `replace` | [`RouterReplace`](RouterReplace.md)\<`TRoutes` \| `TPlugin`\[`"routes"`\]\> | Replaces the current entry in the history stack with a new one. |
| <a id="resolve"></a> `resolve` | [`RouterResolve`](RouterResolve.md)\<`TRoutes` \| `TPlugin`\[`"routes"`\]\> | Creates a ResolvedRoute record for a given route name and params. |
| <a id="route"></a> `route` | \| [`RouterRouteUnion`](RouterRouteUnion.md)\<`TRoutes`\> \| [`RouterRouteUnion`](RouterRouteUnion.md)\<`TPlugin`\[`"routes"`\]\> | Manages the current route state. |
| <a id="start"></a> `start` | () => `Promise`\<`void`\> | Initializes the router based on the initial route. Automatically called when the router is installed. Calling this more than once has no effect. |
| <a id="started"></a> `started` | `Ref`\<`boolean`\> | Returns true if the router has been started. |
| <a id="stop"></a> `stop` | () => `void` | Stops the router and teardown any listeners. |


================================================
FILE: docs/api/types/RouterAssets.md
================================================
# Types: RouterAssets\<TRouter\>

```ts
type RouterAssets<TRouter> = object;
```

## Type Parameters

| Type Parameter |
| ------ |
| `TRouter` *extends* [`Router`](Router.md) |

## Compositions

| Property | Type | Description |
| ------ | ------ | ------ |
| <a id="uselink"></a> `useLink` | `ReturnType`\<*typeof* `createUseLink`\> | A composition to export much of the functionality that drives RouterLink component. Also exports some useful context about routes relationship to current URL and convenience methods for navigating. **Param** The name of the route or a valid URL. **Param** If providing route name, this argument will expect corresponding params. **Param** [RouterResolveOptions](RouterResolveOptions.md) Same options as router resolve. |
| <a id="usequeryvalue"></a> `useQueryValue` | `ReturnType`\<*typeof* `createUseQueryValue`\> | A composition to access a specific query value from the current route. |
| <a id="userejection"></a> `useRejection` | `ReturnType`\<*typeof* `createUseRejection`\> | A composition to access the rejection from the router. |
| <a id="useroute"></a> `useRoute` | `ReturnType`\<*typeof* `createUseRoute`\> | A composition to access the current route or verify a specific route name within a Vue component. This function provides two overloads: 1. When called without arguments, it returns the current route from the router without types. 2. When called with a route name, it checks if the current active route includes the specified route name. The function also sets up a reactive watcher on the route object from the router to continually check the validity of the route name if provided, throwing an error if the validation fails at any point during the component's lifecycle. **Template** A string type that should match route name of `RouterRouteName<TRouter>`, ensuring the route name exists. **Param** Optional. The name of the route to validate against the current active routes. **Throws** Throws an error if the provided route name is not valid or does not match the current route. |
| <a id="userouter"></a> `useRouter` | `ReturnType`\<*typeof* `createUseRouter`\> | A composition to access the installed router instance within a Vue component. **Throws** Throws an error if the router has not been installed, ensuring the component does not operate without routing functionality. |

## Components

| Property | Type | Description |
| ------ | ------ | ------ |
| <a id="routerlink"></a> `RouterLink` | `ReturnType`\<*typeof* `createRouterLink`\> | A component to render a link to a route or any url. **Param** The props to pass to the router link component. |
| <a id="routerview"></a> `RouterView` | `ReturnType`\<*typeof* `createRouterView`\> | A component to render the current route's component. **Param** The props to pass to the router view component. |

## Guards

| Property | Type | Description |
| ------ | ------ | ------ |
| <a id="isroute"></a> `isRoute` | `ReturnType`\<*typeof* `createIsRoute`\> | A guard to verify if a route or unknown value matches a given route name. **Param** The name of the route to check against the current route. |

## Hooks

| Property | Type | Description |
| ------ | ------ | ------ |
| <a id="onafterrouteleave"></a> `onAfterRouteLeave` | [`AddAfterLeaveHook`](AddAfterLeaveHook.md)\<[`RouterRoutes`](RouterRoutes.md)\<`TRouter`\>, [`RouterRejections`](RouterRejections.md)\<`TRouter`\>\> | Registers a hook that is called after a route has been left. Must be called during setup. This can be used for cleanup actions after the component is no longer active, ensuring proper resource management. **Param** The hook callback function |
| <a id="onafterrouteupdate"></a> `onAfterRouteUpdate` | [`AddAfterUpdateHook`](AddAfterUpdateHook.md)\<[`RouterRoutes`](RouterRoutes.md)\<`TRouter`\>, [`RouterRejections`](RouterRejections.md)\<`TRouter`\>\> | Registers a hook that is called after a route has been updated. Must be called during setup. This is ideal for responding to updates within the same route, such as parameter changes, without full component reloads. **Param** The hook callback function |
| <a id="onbeforerouteleave"></a> `onBeforeRouteLeave` | [`AddBeforeLeaveHook`](AddBeforeLeaveHook.md)\<[`RouterRoutes`](RouterRoutes.md)\<`TRouter`\>, [`RouterRejections`](RouterRejections.md)\<`TRouter`\>\> | Registers a hook that is called before a route is left. Must be called from setup. This is useful for performing actions or cleanups before navigating away from a route component. **Param** The hook callback function |
| <a id="onbeforerouteupdate"></a> `onBeforeRouteUpdate` | [`AddBeforeUpdateHook`](AddBeforeUpdateHook.md)\<[`RouterRoutes`](RouterRoutes.md)\<`TRouter`\>, [`RouterRejections`](RouterRejections.md)\<`TRouter`\>\> | Registers a hook that is called before a route is updated. Must be called from setup. This is particularly useful for handling changes in route parameters or query while staying within the same component. **Param** The hook callback function |


================================================
FILE: docs/api/types/RouterLinkProps.md
================================================
# Types: RouterLinkProps\<TRouter\>

```ts
type RouterLinkProps<TRouter> = RouterPushOptions & object;
```

## Type Declaration

### prefetch?

```ts
optional prefetch: PrefetchConfig;
```

Determines what assets are prefetched when router-link is rendered for this route. Overrides route level prefetch.

### to

```ts
to: 
  | UrlString
  | ResolvedRoute
| ToCallback<TRouter>;
```

The url string to navigate to or a callback that returns a url string

## Type Parameters

| Type Parameter |
| ------ |
| `TRouter` *extends* [`Router`](Router.md) |


================================================
FILE: docs/api/types/RouterOptions.md
================================================
# Types: RouterOptions

```ts
type RouterOptions = object;
```

Options to initialize a [Router](Router.md) instance.

## Properties

| Property | Type | Description |
| ------ | ------ | ------ |
| <a id="base"></a> `base?` | `string` | Base path to be prepended to any URL. Can be used for Vue applications that run in nested folder for domain. For example having `base` of `/foo` would assume all routes should start with `your.domain.com/foo`. |
| <a id="historymode"></a> `historyMode?` | `RouterHistoryMode` | Specifies the history mode for the router, such as "browser", "memory", or "hash". **Default** `"auto"` |
| <a id="initialurl"></a> `initialUrl?` | `string` | Initial URL for the router to use. Required if using Node environment. Defaults to window.location when using browser. **Default** `window.location.toString()` |
| <a id="isglobalrouter"></a> `isGlobalRouter?` | `boolean` | When false, createRouterAssets must be used for component and hooks. Assets exported by the library will not work with the created router instance. **Default** `true` |
| <a id="prefetch"></a> `prefetch?` | [`PrefetchConfig`](PrefetchConfig.md) | Determines what assets are prefetched when router-link is rendered for a specific route |
| <a id="rejections"></a> `rejections?` | `Rejections` | Components assigned to each type of rejection your router supports. |
| <a id="removetrailingslashes"></a> `removeTrailingSlashes?` | `boolean` | Removes trailing slashes from the URL before matching routes. The browser's url is updated to reflect using `router.replace`. **Default** `true` |


================================================
FILE: docs/api/types/RouterPlugin.md
================================================
# Types: RouterPlugin\<TRoutes, TRejections\>

```ts
type RouterPlugin<TRoutes, TRejections> = object;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) | [`Routes`](Routes.md) |
| `TRejections` *extends* `Rejections` | `Rejections` |

## Properties

| Property | Type | Description |
| ------ | ------ | ------ |
| <a id="hooks"></a> `hooks` | `Hooks` | **`Internal`** The hooks supplied by the plugin. |
| <a id="rejections"></a> `rejections` | `TRejections` | **`Internal`** The rejections supplied by the plugin. * |
| <a id="routes"></a> `routes` | `TRoutes` | **`Internal`** The routes supplied by the plugin. |


================================================
FILE: docs/api/types/RouterPush.md
================================================
# Types: RouterPush()\<TRoutes\>

```ts
type RouterPush<TRoutes> = {
<TSource>  (name, ...args): Promise<void>;
  (route, options?): Promise<void>;
  (url, options?): Promise<void>;
};
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) | `any` |

## Call Signature

```ts
<TSource>(name, ...args): Promise<void>;
```

### Type Parameters

| Type Parameter |
| ------ |
| `TSource` *extends* `string` |

### Parameters

| Parameter | Type |
| ------ | ------ |
| `name` | `TSource` |
| ...`args` | `RouterPushArgs`\<`TRoutes`, `TSource`\> |

### Returns

`Promise`\<`void`\>

## Call Signature

```ts
(route, options?): Promise<void>;
```

### Parameters

| Parameter | Type |
| ------ | ------ |
| `route` | [`ResolvedRoute`](ResolvedRoute.md) |
| `options?` | [`RouterPushOptions`](RouterPushOptions.md)\<`unknown`\> |

### Returns

`Promise`\<`void`\>

## Call Signature

```ts
(url, options?): Promise<void>;
```

### Parameters

| Parameter | Type |
| ------ | ------ |
| `url` | [`UrlString`](UrlString.md) |
| `options?` | [`RouterPushOptions`](RouterPushOptions.md)\<`unknown`\> |

### Returns

`Promise`\<`void`\>


================================================
FILE: docs/api/types/RouterPushOptions.md
================================================
# Types: RouterPushOptions\<TState\>

```ts
type RouterPushOptions<TState> = object;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TState` | `unknown` |

## Properties

| Property | Type | Description |
| ------ | ------ | ------ |
| <a id="hash"></a> `hash?` | `string` | The hash to append to the url. |
| <a id="query"></a> `query?` | [`QuerySource`](QuerySource.md) | The query string to add to the url. |
| <a id="replace"></a> `replace?` | `boolean` | Whether to replace the current history entry. |
| <a id="state"></a> `state?` | `Partial`\<`TState`\> | State values to pass to the route. |


================================================
FILE: docs/api/types/RouterReject.md
================================================
# Types: RouterReject()\<TRejections\>

```ts
type RouterReject<TRejections> = <TSource>(type) => void;
```

## Type Parameters

| Type Parameter |
| ------ |
| `TRejections` *extends* `Rejections` \| `undefined` |

## Type Parameters

| Type Parameter |
| ------ |
| `TSource` *extends* `RejectionType`\<`TRejections`\> \| `BuiltInRejectionType` |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `type` | `TSource` |

## Returns

`void`


================================================
FILE: docs/api/types/RouterRejections.md
================================================
# Types: RouterRejections\<TRouter\>

```ts
type RouterRejections<TRouter> = TRouter extends Router<any, infer TOptions, infer TPlugins> ? ExtractRejections<TOptions> | ExtractRejections<TPlugins> : [];
```

## Type Parameters

| Type Parameter |
| ------ |
| `TRouter` *extends* [`Router`](Router.md) |


================================================
FILE: docs/api/types/RouterReplace.md
================================================
# Types: RouterReplace()\<TRoutes\>

```ts
type RouterReplace<TRoutes> = {
<TSource>  (name, ...args): Promise<void>;
  (route, options?): Promise<void>;
  (url, options?): Promise<void>;
};
```

## Type Parameters

| Type Parameter |
| ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) |

## Call Signature

```ts
<TSource>(name, ...args): Promise<void>;
```

### Type Parameters

| Type Parameter |
| ------ |
| `TSource` *extends* `string` |

### Parameters

| Parameter | Type |
| ------ | ------ |
| `name` | `TSource` |
| ...`args` | `RouterReplaceArgs`\<`TRoutes`, `TSource`\> |

### Returns

`Promise`\<`void`\>

## Call Signature

```ts
(route, options?): Promise<void>;
```

### Parameters

| Parameter | Type |
| ------ | ------ |
| `route` | [`ResolvedRoute`](ResolvedRoute.md) |
| `options?` | [`RouterReplaceOptions`](RouterReplaceOptions.md)\<`unknown`\> |

### Returns

`Promise`\<`void`\>

## Call Signature

```ts
(url, options?): Promise<void>;
```

### Parameters

| Parameter | Type |
| ------ | ------ |
| `url` | [`UrlString`](UrlString.md) |
| `options?` | [`RouterReplaceOptions`](RouterReplaceOptions.md)\<`unknown`\> |

### Returns

`Promise`\<`void`\>


================================================
FILE: docs/api/types/RouterReplaceOptions.md
================================================
# Types: RouterReplaceOptions\<TState\>

```ts
type RouterReplaceOptions<TState> = object;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TState` | `unknown` |

## Properties

| Property | Type |
| ------ | ------ |
| <a id="hash"></a> `hash?` | `string` |
| <a id="query"></a> `query?` | [`QuerySource`](QuerySource.md) |
| <a id="state"></a> `state?` | `Partial`\<`TState`\> |


================================================
FILE: docs/api/types/RouterResolve.md
================================================
# Types: RouterResolve()\<TRoutes\>

```ts
type RouterResolve<TRoutes> = <TSource>(name, ...args) => ResolvedRoute;
```

## Type Parameters

| Type Parameter |
| ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) |

## Type Parameters

| Type Parameter |
| ------ |
| `TSource` *extends* `RoutesName`\<`TRoutes`\> |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `name` | `TSource` |
| ...`args` | `RouterResolveArgs`\<`TRoutes`, `TSource`\> |

## Returns

[`ResolvedRoute`](ResolvedRoute.md)


================================================
FILE: docs/api/types/RouterResolveOptions.md
================================================
# Types: RouterResolveOptions\<TState\>

```ts
type RouterResolveOptions<TState> = object;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TState` | `unknown` |

## Properties

| Property | Type |
| ------ | ------ |
| <a id="hash"></a> `hash?` | `string` |
| <a id="query"></a> `query?` | [`QuerySource`](QuerySource.md) |
| <a id="state"></a> `state?` | `Partial`\<`TState`\> |


================================================
FILE: docs/api/types/RouterResolvedRouteUnion.md
================================================
# Types: RouterResolvedRouteUnion\<TRoutes\>

```ts
type RouterResolvedRouteUnion<TRoutes> = { [K in keyof TRoutes]: ResolvedRoute<TRoutes[K]> }[number];
```

This type is the same as `ResolvedRoute<TRoutes[number]>` while remaining distributive

## Type Parameters

| Type Parameter |
| ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) |


================================================
FILE: docs/api/types/RouterRoute.md
================================================
# Types: RouterRoute\<TRoute\>

```ts
type RouterRoute<TRoute> = object;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TRoute` *extends* [`ResolvedRoute`](ResolvedRoute.md) | [`ResolvedRoute`](ResolvedRoute.md) |

## Accessors

### query

#### Get Signature

```ts
get query(): URLSearchParams;
```

##### Returns

`URLSearchParams`

#### Set Signature

```ts
set query(value): void;
```

##### Parameters

| Parameter | Type |
| ------ | ------ |
| `value` | \| `string` \| `URLSearchParams` \| `string`[][] \| `Record`\<`string`, `string`\> \| `undefined` |

##### Returns

`void`

## Properties

| Property | Modifier | Type | Description |
| ------ | ------ | ------ | ------ |
| <a id="hash"></a> `hash` | `readonly` | `string` | Hash value of the route. |
| <a id="hooks"></a> `hooks` | `readonly` | `TRoute`\[`"hooks"`\] | **`Internal`** The stores for routes including ancestors. |
| <a id="href"></a> `href` | `readonly` | `TRoute`\[`"href"`\] | String value of the resolved URL. |
| <a id="id"></a> `id` | `readonly` | `TRoute`\[`"id"`\] | Unique identifier for the route, generated by router. |
| <a id="matched"></a> `matched` | `readonly` | `TRoute`\[`"matched"`\] | The specific route properties that were matched in the current route. |
| <a id="matches"></a> `matches` | `readonly` | `TRoute`\[`"matches"`\] | The specific route properties that were matched in the current route, including any ancestors. Order of routes will be from greatest ancestor to narrowest matched. |
| <a id="name"></a> `name` | `readonly` | `TRoute`\[`"name"`\] | Identifier for the route as defined by user. Name must be unique among named routes. Name is used for routing and for matching. |
| <a id="params"></a> `params` | `public` | `TRoute`\[`"params"`\] | - |
| <a id="state"></a> `state` | `public` | `TRoute`\[`"state"`\] | - |
| <a id="update"></a> `update` | `readonly` | `RouteUpdate`\<`TRoute`\> | Update the route. |


================================================
FILE: docs/api/types/RouterRouteName.md
================================================
# Types: RouterRouteName\<TRouter\>

```ts
type RouterRouteName<TRouter> = TRouter extends Router<infer TRoutes> ? RoutesName<TRoutes> : RoutesName<Route[]>;
```

## Type Parameters

| Type Parameter |
| ------ |
| `TRouter` *extends* [`Router`](Router.md) |


================================================
FILE: docs/api/types/RouterRouteUnion.md
================================================
# Types: RouterRouteUnion\<TRoutes\>

```ts
type RouterRouteUnion<TRoutes> = { [K in keyof TRoutes]: TRoutes[K]["name"] extends "" ? never : RouterRoute<ResolvedRoute<TRoutes[K]>> }[number];
```

This type is the same as `RouterRoute<ResolvedRoute<TRoutes[number]>>` while remaining distributive.
Routes without a name (empty string) are excluded so that router.route.name is never ''.

## Type Parameters

| Type Parameter |
| ------ |
| `TRoutes` *extends* [`Routes`](Routes.md) |


================================================
FILE: docs/api/types/RouterRoutes.md
================================================
# Types: RouterRoutes\<TRouter\>

```ts
type RouterRoutes<TRouter> = TRouter extends Router<infer TRoutes> ? TRoutes : Routes;
```

## Type Parameters

| Type Parameter |
| ------ |
| `TRouter` *extends* [`Router`](Router.md) |


================================================
FILE: docs/api/types/RouterViewPropsGetter.md
================================================
# Types: RouterViewPropsGetter()\<TOptions\>

```ts
type RouterViewPropsGetter<TOptions> = (route, context) => MaybePromise<RouterViewProps & Record<string, unknown>>;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TOptions` *extends* [`CreateRouteOptions`](CreateRouteOptions.md) | [`CreateRouteOptions`](CreateRouteOptions.md) |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `route` | [`ResolvedRoute`](ResolvedRoute.md)\<[`ToRoute`](ToRoute.md)\<`TOptions`\>\> |
| `context` | [`PropsCallbackContext`](PropsCallbackContext.md)\<[`ToRoute`](ToRoute.md)\<`TOptions`\>, `TOptions`\> |

## Returns

`MaybePromise`\<`RouterViewProps` & `Record`\<`string`, `unknown`\>\>


================================================
FILE: docs/api/types/Routes.md
================================================
# Types: Routes

```ts
type Routes = readonly Route[];
```

Represents an immutable array of Route instances. Return value of `createRoute`, expected param for `createRouter`.


================================================
FILE: docs/api/types/ToCallback.md
================================================
# Types: ToCallback()\<TRouter\>

```ts
type ToCallback<TRouter> = (resolve) => 
  | ResolvedRoute
  | UrlString
  | undefined;
```

## Type Parameters

| Type Parameter |
| ------ |
| `TRouter` *extends* [`Router`](Router.md) |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `resolve` | `TRouter`\[`"resolve"`\] |

## Returns

  \| [`ResolvedRoute`](ResolvedRoute.md)
  \| [`UrlString`](UrlString.md)
  \| `undefined`


================================================
FILE: docs/api/types/ToRoute.md
================================================
# Types: ToRoute\<TOptions, TProps\>

```ts
type ToRoute<TOptions, TProps> = CreateRouteOptions extends TOptions ? Route : TOptions extends object ? Route<ToName<TOptions["name"]>, CombineUrl<TParent, ToUrl<TOptions & WithoutComponents>>, CombineMeta<ToMeta<TParent["meta"]>, ToMeta<TOptions["meta"]>>, CombineState<ToState<TParent["state"]>, ToState<TOptions["state"]>>, ToMatches<TOptions, CreateRouteProps<TOptions> extends TProps ? undefined : TProps>, [...ToRouteContext<TParent["context"]>, ...ToRouteContext<TOptions["context"]>]> : Route<ToName<TOptions["name"]>, ToUrl<Identity<TOptions & WithoutComponents>>, ToMeta<TOptions["meta"]>, ToState<TOptions["state"]>, ToMatches<TOptions, CreateRouteProps<TOptions> extends TProps ? undefined : TProps>, ToRouteContext<TOptions["context"]>>;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TOptions` *extends* [`CreateRouteOptions`](CreateRouteOptions.md) | - |
| `TProps` *extends* [`CreateRouteProps`](CreateRouteProps.md)\<`TOptions`\> \| `undefined` | `undefined` |


================================================
FILE: docs/api/types/ToUrl.md
================================================
# Types: ToUrl\<TOptions\>

```ts
type ToUrl<TOptions> = Url<Identity<ToUrlPart<TOptions["host"]>["params"] & ToUrlPart<TOptions["path"]>["params"] & ToUrlQueryPart<TOptions["query"]>["params"] & ToUrlPart<TOptions["hash"]>["params"]>>;
```

## Type Parameters

| Type Parameter |
| ------ |
| `TOptions` *extends* [`CreateUrlOptions`](CreateUrlOptions.md) |


================================================
FILE: docs/api/types/Url.md
================================================
# Types: Url\<TParams\>

```ts
type Url<TParams> = object;
```

Represents the structure of a url parts. Can be used to create a url with support for params.

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TParams` *extends* `UrlParams` | `UrlParams` |

## Methods

### parse()

```ts
parse(url, options?): Identity<MakeOptional<{ [K in string | number | symbol]: TParams[K] extends OptionalUrlParam<TParam> ? TParam extends Required<ParamGetSet> ? ExtractParamType<TParam> : ExtractParamType<TParam> | undefined : TParams[K] extends RequiredUrlParam<TParam> ? ExtractParamType<TParam> : unknown }>>;
```

Parses the url supplied and returns any params found.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `url` | `string` |
| `options?` | [`ParseUrlOptions`](ParseUrlOptions.md) |

#### Returns

`Identity`\<`MakeOptional`\<\{ \[K in string \| number \| symbol\]: TParams\[K\] extends OptionalUrlParam\<TParam\> ? TParam extends Required\<ParamGetSet\> ? ExtractParamType\<TParam\> : ExtractParamType\<TParam\> \| undefined : TParams\[K\] extends RequiredUrlParam\<TParam\> ? ExtractParamType\<TParam\> : unknown \}\>\>

***

### stringify()

```ts
stringify(...params): UrlString;
```

Converts the url parts to a full url.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| ...`params` | `UrlParamsArgs`\<`TParams`\> |

#### Returns

[`UrlString`](UrlString.md)

***

### tryParse()

```ts
tryParse(url, options?): 
  | {
  params: ToUrlParamsReading<TParams>;
  success: true;
}
  | {
  error: Error;
  params: {
  };
  success: false;
};
```

Parses the url supplied and returns any params found.

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `url` | `string` |
| `options?` | [`ParseUrlOptions`](ParseUrlOptions.md) |

#### Returns

  \| \{
  `params`: `ToUrlParamsReading`\<`TParams`\>;
  `success`: `true`;
\}
  \| \{
  `error`: `Error`;
  `params`: \{
  \};
  `success`: `false`;
\}

## Properties

| Property | Type | Description |
| ------ | ------ | ------ |
| <a id="is_url_symbol"></a> `[IS_URL_SYMBOL]` | `true` | **`Internal`** Symbol to identify if the url is a valid url. |
| <a id="isrelative"></a> `isRelative` | `boolean` | True if the url is relative. False if the url is absolute. |
| <a id="params"></a> `params` | `TParams` | **`Internal`** The parameters type for the url. Non functional and undefined at runtime. |


================================================
FILE: docs/api/types/UrlParamsReading.md
================================================
# Types: UrlParamsReading\<TUrl\>

```ts
type UrlParamsReading<TUrl> = ToUrlParamsReading<TUrl["params"]>;
```

Extracts combined types of path and query parameters for a given url, creating a unified parameter object.

## Type Parameters

| Type Parameter | Description |
| ------ | ------ |
| `TUrl` *extends* [`Url`](Url.md) | The url type from which to extract and merge parameter types. |

## Returns

A record of parameter names to their respective types, extracted and merged from both path and query parameters.


================================================
FILE: docs/api/types/UrlParamsWriting.md
================================================
# Types: UrlParamsWriting\<TUrl\>

```ts
type UrlParamsWriting<TUrl> = ToUrlParamsWriting<TUrl["params"]>;
```

Extracts combined types of path and query parameters for a given url, creating a unified parameter object.
Differs from ExtractRouteParamTypesReading in that optional params with defaults will remain optional.

## Type Parameters

| Type Parameter | Description |
| ------ | ------ |
| `TUrl` *extends* [`Url`](Url.md) | The url type from which to extract and merge parameter types. |

## Returns

A record of parameter names to their respective types, extracted and merged from both path and query parameters.


================================================
FILE: docs/api/types/UrlString.md
================================================
# Types: UrlString

```ts
type UrlString = `http://${string}` | `https://${string}` | `/${string}`;
```


================================================
FILE: docs/api/types/UseLink.md
================================================
# Types: UseLink

```ts
type UseLink = object;
```

## Properties

| Property | Type | Description |
| ------ | ------ | ------ |
| <a id="element"></a> `element` | `Ref`\<`HTMLElement` \| `undefined`\> | A template ref to bind to the dom for automatic prefetching |
| <a id="href"></a> `href` | `ComputedRef`\<[`UrlString`](UrlString.md) \| `undefined`\> | Resolved URL with params interpolated and query applied. Same value as `router.resolve`. |
| <a id="isactive"></a> `isActive` | `ComputedRef`\<`boolean`\> | True if route matches current URL, or is a parent route that matches the parent of the current URL. |
| <a id="isexactactive"></a> `isExactActive` | `ComputedRef`\<`boolean`\> | True if route matches current URL exactly. |
| <a id="isexactmatch"></a> `isExactMatch` | `ComputedRef`\<`boolean`\> | True if route matches current URL. Route is the same as what's currently stored at `router.route`. |
| <a id="isexternal"></a> `isExternal` | `ComputedRef`\<`boolean`\> | - |
| <a id="ismatch"></a> `isMatch` | `ComputedRef`\<`boolean`\> | True if route matches current URL or is ancestor of route that matches current URL |
| <a id="push"></a> `push` | (`options?`) => `Promise`\<`void`\> | Convenience method for executing `router.push` with route context passed in. |
| <a id="replace"></a> `replace` | (`options?`) => `Promise`\<`void`\> | Convenience method for executing `router.replace` with route context passed in. |
| <a id="route"></a> `route` | `ComputedRef`\<[`ResolvedRoute`](ResolvedRoute.md) \| `undefined`\> | ResolvedRoute if matched. Same value as `router.find` |


================================================
FILE: docs/api/types/UseLinkOptions.md
================================================
# Types: UseLinkOptions

```ts
type UseLinkOptions = RouterPushOptions & object;
```

## Type Declaration

### prefetch?

```ts
optional prefetch: PrefetchConfig;
```


================================================
FILE: docs/api/types/WithHost.md
================================================
# Types: WithHost\<THost\>

```ts
type WithHost<THost> = object;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `THost` *extends* `string` \| `UrlPart` | `string` \| `UrlPart` |

## Properties

| Property | Type | Description |
| ------ | ------ | ------ |
| <a id="host"></a> `host` | `THost` | Host part of URL. |


================================================
FILE: docs/api/types/WithParent.md
================================================
# Types: WithParent\<TParent\>

```ts
type WithParent<TParent> = object;
```

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `TParent` *extends* [`Route`](Route.md) | [`Route`](Route.md) |

## Properties

| Property | Type |
| ------ | ------ |
| <a id="parent"></a> `parent` | `TParent` |


================================================
FILE: docs/api/types/WithoutHost.md
================================================
# Types: WithoutHost

```ts
type WithoutHost = object;
```

## Properties

| Property | Type |
| ------ | ------ |
| <a id="host"></a> `host?` | `never` |


================================================
FILE: docs/api/types/WithoutParent.md
================================================
# Types: WithoutParent

```ts
type WithoutParent = object;
```

## Properties

| Property | Type |
| ------ | ------ |
| <a id="parent"></a> `parent?` | `never` |


================================================
FILE: docs/api/variables/IS_URL_SYMBOL.md
================================================
# Variables: IS\_URL\_SYMBOL

```ts
const IS_URL_SYMBOL: unique symbol;
```


================================================
FILE: docs/components/router-link.md
================================================
# RouterLink

The router link component is a wrapper around the anchor element. It is registered globally by the [router plugin](/quick-start#vue-plugin).

## Props

| Prop | Required | Type | Description |
| --- | --- | --- | --- |
| to | true | [`Url`](/api/types/Url), [`ResolvedRoute`](/api/types/ResolvedRoute), or [`ToCallback`](/api/types/ToCallback) | The location to navigate to when clicked |
| replace | false | `boolean` | When true, replaces the current history entry instead of adding a new one |
| prefetch | false | `boolean`, [`PrefetchStrategy`](/api/types/PrefetchStrategy) or [`PrefetchConfig`](/api/types/PrefetchConfig) | Controls what assets are prefetched when the link is rendered |
| query | false | [`QuerySource`](/api/types/QuerySource) | Query parameters to append to the URL |
| hash | false | `string` | URL hash fragment to append |
| state | false | `unknown` | State object to associate with the history entry |

### The `to` prop

The `to` prop determines the the href attribute of the anchor element. The `to` prop can be a [Url](/api/types/Url), a [ResolvedRoute](/api/types/ResolvedRoute), or a getter that returns either type.

### Using a [ResolvedRoute](/api/types/ResolvedRoute)

Using a [ResolvedRoute](/api/types/ResolvedRoute) is the recommended way to navigate to a predefined route. When the `to` prop is a getter the router's resolve function is passed in as an argument. Here are two ways of creating the same link.

```vue
<router-link :to="(resolve) => resolve('profile', { userId: 123 })">Profile</router-link>
```

```vue
<script setup lang="ts">
  import { useRouter } from '@kitbag/router'

  const router = useRouter()
  const profileRoute = router.resolve('profile', { userId: 123 })
</script>

<template>
  <router-link :to="profileRoute">Profile</router-link>
</template>
```

### Using a [Url](/api/types/Url)

As a convenience, you can also use a [Url](/api/types/Url) for the `to` prop. This is not type safe and is not recommended. But it can be useful for creating links to external sites.

```vue
<router-link to="https://example.com">External Link</router-link>
```

::: info External Routes
You can define [external routes](/core-concepts/external-routes) in your router configuration for a type safe way to navigate to external urls.
:::

## Slots

`RouterLink` provides a default slot to render the link text. But it also exposes the following slot scopes.

| Property | Type | Description |
| --- | --- | --- |
| route | [`ResolvedRoute`](/api/types/ResolvedRoute) or `undefined` | The resolved route object for the link destination |
| isMatch | `boolean` | Whether the current route matches the link's location |
| isExactMatch | `boolean` | Whether the current route exactly matches the link's location |
| isExternal | `boolean` | Whether the link points to an external URL |

```vue
<router-link :to="(resolve) => resolve('profile', { userId: 123 })" v-slot="{ route, isMatch, isExactMatch, isExternal }">
  ...
</router-link>
```

## Classes

The `RouterLink` component will automatically add the `router-link--match` class to the anchor element when the current route matches the route specified in the `to` prop. It will also add the `router-link--exact-match` class when the current route matches the route specified in the `to` prop exactly.


================================================
FILE: docs/components/router-view.md
================================================
# RouterView

The router view component is how route components are rendered. It is registered globally by the [router plugin](/quick-start#vue-plugin).

## Props

| Prop | Required | Type | Default | Description |
| --- | --- | --- | --- | --- |
| name | false | `string` | `default` | The name of component to render |

### The `name` prop

The `name` prop is used to specify the name of the component to render. Multiple components can be defined for a single route by using the `components` option.

## Slots

`RouterView` provides a default slot to render the route component. It receives the following slot scopes.

| Property | Type | Description |
| --- | --- | --- |
| route | [`ResolvedRoute`](/api/types/ResolvedRoute) | The resolved route object for the current route |
| component | `Component` | The component to render |
| rejection | `RouterRejection` | The rejection object for the current route |

## Transitions

The default slot can be used to layer in a [Vue transition](https://vuejs.org/guide/built-ins/transition.html) if desired.

```html
<router-view>
  <template #default="{ component }">
    <transition name="fade">
      <component :is="component" />
    </transition>
  </template>
</router-view>
```

## Component Reuse

Vue will reuse components if a route change ends up rendering the same underlying component. This has advantages but can sometimes cause issues. You can avoid this by [using the `key` attribute](https://vuejs.org/api/built-in-special-attributes.html#key). Using the `route.href` property is a good way to generate a unique key for each route.

```html{3}
<router-view>
  <template #default="{ component, route }">
    <transition name="fade">
      <component :is="component" :key="route.href" />
    </transition>
  </template>
</router-view>
```


================================================
FILE: docs/composables/useLink.md
================================================
# useLink

Used to create a link to a route. Generally the [`RouterLink`](/components/router-link) component should be used instead of this composable. See the ['UseLink'](/api/types/UseLink) api reference for more information on the return type.

```ts
import { useLink } from '@kitbag/router'

const link = useLink('profile', { userId: 123 })
```

:::tip
[Register](/quick-start.html#type-safety) your router to get the proper types when using this composable.
:::


================================================
FILE: docs/composables/useQueryValue.md
================================================
# useQueryValue

Returns the value of a specific key in the query string. The query can be accessed using the Router Route's [query property](/api/types/RouterRoute#query) but this composable allows using [param types](/core-concepts/params#param-types) to ensure type safety. This is useful when you need to interact with the query but without defining a [query param](/core-concepts/params#query-params).

## Arguments

| Name | Type | Required | Descript
Download .txt
gitextract_w2q946kp/

├── .github/
│   ├── FUNDING.yml
│   ├── dependabot.yml
│   └── workflows/
│       ├── auto-docs.yml
│       ├── notify-stars.yml
│       ├── release.yml
│       └── test.yml
├── .gitignore
├── .nvmrc
├── .vscode/
│   └── settings.json
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── docs/
│   ├── .vitepress/
│   │   ├── config.ts
│   │   └── theme/
│   │       ├── index.js
│   │       └── styles/
│   │           └── vars.css
│   ├── advanced-concepts/
│   │   ├── hooks.md
│   │   ├── plugins.md
│   │   ├── prefetching.md
│   │   ├── redirects.md
│   │   ├── rejections.md
│   │   ├── route-matching.md
│   │   ├── route-meta.md
│   │   ├── route-narrowing.md
│   │   └── route-state.md
│   ├── api/
│   │   ├── components/
│   │   │   ├── RouterLink.md
│   │   │   └── RouterView.md
│   │   ├── compositions/
│   │   │   ├── useLink.md
│   │   │   ├── useQueryValue.md
│   │   │   ├── useRejection.md
│   │   │   ├── useRoute.md
│   │   │   └── useRouter.md
│   │   ├── errors/
│   │   │   ├── DuplicateParamsError.md
│   │   │   ├── MetaPropertyConflict.md
│   │   │   ├── RouterNotInstalledError.md
│   │   │   └── UseRouteInvalidError.md
│   │   ├── functions/
│   │   │   ├── arrayOf.md
│   │   │   ├── asUrlString.md
│   │   │   ├── combineRoutes.md
│   │   │   ├── createExternalRoute.md
│   │   │   ├── createParam.md
│   │   │   ├── createRejection.md
│   │   │   ├── createRoute.md
│   │   │   ├── createRouter.md
│   │   │   ├── createRouterAssets.md
│   │   │   ├── createRouterPlugin.md
│   │   │   ├── createUrl.md
│   │   │   ├── isUrlWithSchema.md
│   │   │   ├── isWithComponent.md
│   │   │   ├── isWithComponentProps.md
│   │   │   ├── isWithComponentPropsRecord.md
│   │   │   ├── isWithComponents.md
│   │   │   ├── isWithParent.md
│   │   │   ├── literal.md
│   │   │   ├── tupleOf.md
│   │   │   ├── unionOf.md
│   │   │   ├── withDefault.md
│   │   │   └── withParams.md
│   │   ├── hooks/
│   │   │   ├── onAfterRouteLeave.md
│   │   │   ├── onAfterRouteUpdate.md
│   │   │   ├── onBeforeRouteLeave.md
│   │   │   └── onBeforeRouteUpdate.md
│   │   ├── index.md
│   │   ├── interfaces/
│   │   │   └── Register.md
│   │   ├── type-guards/
│   │   │   ├── isRoute.md
│   │   │   └── isUrlString.md
│   │   ├── typedoc-sidebar.json
│   │   ├── types/
│   │   │   ├── AddAfterEnterHook.md
│   │   │   ├── AddAfterLeaveHook.md
│   │   │   ├── AddAfterUpdateHook.md
│   │   │   ├── AddBeforeEnterHook.md
│   │   │   ├── AddBeforeLeaveHook.md
│   │   │   ├── AddBeforeUpdateHook.md
│   │   │   ├── AddComponentHook.md
│   │   │   ├── AddErrorHook.md
│   │   │   ├── AddGlobalHooks.md
│   │   │   ├── AddPluginErrorHook.md
│   │   │   ├── AfterEnterHook.md
│   │   │   ├── AfterEnterHookContext.md
│   │   │   ├── AfterHookLifecycle.md
│   │   │   ├── AfterHookResponse.md
│   │   │   ├── AfterHookRunner.md
│   │   │   ├── AfterLeaveHook.md
│   │   │   ├── AfterLeaveHookContext.md
│   │   │   ├── AfterUpdateHook.md
│   │   │   ├── AfterUpdateHookContext.md
│   │   │   ├── BeforeEnterHook.md
│   │   │   ├── BeforeEnterHookContext.md
│   │   │   ├── BeforeHookLifecycle.md
│   │   │   ├── BeforeHookResponse.md
│   │   │   ├── BeforeHookRunner.md
│   │   │   ├── BeforeLeaveHook.md
│   │   │   ├── BeforeLeaveHookContext.md
│   │   │   ├── BeforeUpdateHook.md
│   │   │   ├── BeforeUpdateHookContext.md
│   │   │   ├── ComponentHook.md
│   │   │   ├── ComponentHookRegistration.md
│   │   │   ├── CreateRouteOptions.md
│   │   │   ├── CreateRouteProps.md
│   │   │   ├── CreateRouterPluginOptions.md
│   │   │   ├── CreateUrlOptions.md
│   │   │   ├── CreatedRouteOptions.md
│   │   │   ├── EmptyRouterPlugin.md
│   │   │   ├── ErrorHook.md
│   │   │   ├── ErrorHookContext.md
│   │   │   ├── ErrorHookRunner.md
│   │   │   ├── ErrorHookRunnerContext.md
│   │   │   ├── ExternalRouteHooks.md
│   │   │   ├── GenericRoute.md
│   │   │   ├── HookLifecycle.md
│   │   │   ├── HookRemove.md
│   │   │   ├── HookTiming.md
│   │   │   ├── InternalRouteHooks.md
│   │   │   ├── LiteralParam.md
│   │   │   ├── Param.md
│   │   │   ├── ParamExtras.md
│   │   │   ├── ParamGetSet.md
│   │   │   ├── ParamGetter.md
│   │   │   ├── ParamSetter.md
│   │   │   ├── ParseUrlOptions.md
│   │   │   ├── PluginAfterRouteHook.md
│   │   │   ├── PluginBeforeRouteHook.md
│   │   │   ├── PluginErrorHook.md
│   │   │   ├── PluginErrorHookContext.md
│   │   │   ├── PluginRouteHooks.md
│   │   │   ├── PrefetchConfig.md
│   │   │   ├── PrefetchConfigOptions.md
│   │   │   ├── PrefetchConfigs.md
│   │   │   ├── PrefetchStrategy.md
│   │   │   ├── PropsCallbackContext.md
│   │   │   ├── PropsCallbackParent.md
│   │   │   ├── PropsGetter.md
│   │   │   ├── QuerySource.md
│   │   │   ├── RegisteredRouter.md
│   │   │   ├── ResolvedRoute.md
│   │   │   ├── ResolvedRouteUnion.md
│   │   │   ├── Route.md
│   │   │   ├── RouteMeta.md
│   │   │   ├── Router.md
│   │   │   ├── RouterAssets.md
│   │   │   ├── RouterLinkProps.md
│   │   │   ├── RouterOptions.md
│   │   │   ├── RouterPlugin.md
│   │   │   ├── RouterPush.md
│   │   │   ├── RouterPushOptions.md
│   │   │   ├── RouterReject.md
│   │   │   ├── RouterRejections.md
│   │   │   ├── RouterReplace.md
│   │   │   ├── RouterReplaceOptions.md
│   │   │   ├── RouterResolve.md
│   │   │   ├── RouterResolveOptions.md
│   │   │   ├── RouterResolvedRouteUnion.md
│   │   │   ├── RouterRoute.md
│   │   │   ├── RouterRouteName.md
│   │   │   ├── RouterRouteUnion.md
│   │   │   ├── RouterRoutes.md
│   │   │   ├── RouterViewPropsGetter.md
│   │   │   ├── Routes.md
│   │   │   ├── ToCallback.md
│   │   │   ├── ToRoute.md
│   │   │   ├── ToUrl.md
│   │   │   ├── Url.md
│   │   │   ├── UrlParamsReading.md
│   │   │   ├── UrlParamsWriting.md
│   │   │   ├── UrlString.md
│   │   │   ├── UseLink.md
│   │   │   ├── UseLinkOptions.md
│   │   │   ├── WithHost.md
│   │   │   ├── WithParent.md
│   │   │   ├── WithoutHost.md
│   │   │   └── WithoutParent.md
│   │   └── variables/
│   │       └── IS_URL_SYMBOL.md
│   ├── components/
│   │   ├── router-link.md
│   │   └── router-view.md
│   ├── composables/
│   │   ├── useLink.md
│   │   ├── useQueryValue.md
│   │   ├── useRoute.md
│   │   └── useRouter.md
│   ├── core-concepts/
│   │   ├── component-props.md
│   │   ├── external-routes.md
│   │   ├── navigation.md
│   │   ├── params.md
│   │   ├── router-route.md
│   │   ├── router.md
│   │   └── routes.md
│   ├── index.md
│   ├── introduction.md
│   ├── migrating-vue-router.md
│   └── quick-start.md
├── eslint.config.js
├── package.json
├── scripts/
│   └── api.js
├── src/
│   ├── components/
│   │   ├── echo.ts
│   │   ├── helloWorld.ts
│   │   ├── rejection.ts
│   │   ├── routerLink.browser.spec.ts
│   │   ├── routerLink.ts
│   │   ├── routerView.browser.spec.ts
│   │   ├── routerView.spec.ts
│   │   └── routerView.ts
│   ├── compositions/
│   │   ├── useComponentsStore.ts
│   │   ├── useEventListener.ts
│   │   ├── useLink.ts
│   │   ├── usePrefetching.ts
│   │   ├── usePropStore.ts
│   │   ├── useQueryValue.browser.spec.ts
│   │   ├── useQueryValue.spec-d.ts
│   │   ├── useQueryValue.ts
│   │   ├── useRejection.ts
│   │   ├── useRoute.browser.spec.ts
│   │   ├── useRoute.spec-d.ts
│   │   ├── useRoute.ts
│   │   ├── useRouter.ts
│   │   ├── useRouterDepth.ts
│   │   ├── useRouterHooks.ts
│   │   └── useVisibilityObserver.ts
│   ├── devtools/
│   │   ├── createRouterDevtools.ts
│   │   ├── filters.ts
│   │   ├── getDevtoolsLabel.ts
│   │   └── types.ts
│   ├── errors/
│   │   ├── contextAbortError.ts
│   │   ├── contextError.ts
│   │   ├── contextPushError.ts
│   │   ├── contextRejectionError.ts
│   │   ├── duplicateNamesError.ts
│   │   ├── duplicateParamsError.ts
│   │   ├── initialRouteMissingError.ts
│   │   ├── invalidRouteParamValueError.ts
│   │   ├── invalidRouteRedirectError.ts
│   │   ├── metaPropertyConflict.ts
│   │   ├── multipleRouteRedirectsError.ts
│   │   ├── routeNotFoundError.ts
│   │   ├── routerNotInstalledError.ts
│   │   └── useRouteInvalidError.ts
│   ├── guards/
│   │   ├── routes.spec-d.ts
│   │   └── routes.ts
│   ├── keys.ts
│   ├── main.ts
│   ├── models/
│   │   └── hooks.ts
│   ├── services/
│   │   ├── arrayOf.spec.ts
│   │   ├── arrayOf.ts
│   │   ├── combineHash.spec.ts
│   │   ├── combineHash.ts
│   │   ├── combineMeta.spec.ts
│   │   ├── combineMeta.ts
│   │   ├── combinePath.spec-d.ts
│   │   ├── combinePath.spec.ts
│   │   ├── combinePath.ts
│   │   ├── combineQuery.spec.ts
│   │   ├── combineQuery.ts
│   │   ├── combineState.spec.ts
│   │   ├── combineState.ts
│   │   ├── combineUrl.spec.ts
│   │   ├── combineUrl.ts
│   │   ├── component.browser.spec.ts
│   │   ├── component.ts
│   │   ├── createComponentHooks.ts
│   │   ├── createComponentsStore.ts
│   │   ├── createCurrentRejection.ts
│   │   ├── createCurrentRoute.ts
│   │   ├── createExternalRoute.spec.ts
│   │   ├── createExternalRoute.ts
│   │   ├── createIsExternal.spec.ts
│   │   ├── createIsExternal.ts
│   │   ├── createParam.ts
│   │   ├── createPropStore.ts
│   │   ├── createRejection.ts
│   │   ├── createRejectionHooks.ts
│   │   ├── createResolvedRoute.spec.ts
│   │   ├── createResolvedRoute.ts
│   │   ├── createResolvedRouteQuery.ts
│   │   ├── createRoute.spec-d.ts
│   │   ├── createRoute.spec.ts
│   │   ├── createRoute.ts
│   │   ├── createRouteHooks.ts
│   │   ├── createRouteId.ts
│   │   ├── createRouteRedirects.spec.ts
│   │   ├── createRouteRedirects.ts
│   │   ├── createRouter.browser.spec.ts
│   │   ├── createRouter.spec-d.ts
│   │   ├── createRouter.spec.ts
│   │   ├── createRouter.ts
│   │   ├── createRouterAssets.ts
│   │   ├── createRouterCallbackContext.ts
│   │   ├── createRouterHistory.browser.spec.ts
│   │   ├── createRouterHistory.ts
│   │   ├── createRouterHooks.ts
│   │   ├── createRouterKeyStore.ts
│   │   ├── createRouterPlugin.browser.spec.ts
│   │   ├── createRouterPlugin.spec-d.ts
│   │   ├── createRouterPlugin.ts
│   │   ├── createRouterRoute.spec.ts
│   │   ├── createRouterRoute.ts
│   │   ├── createUniqueIdSequence.ts
│   │   ├── createUrl.spec.ts
│   │   ├── createUrl.ts
│   │   ├── createVisibilityObserver.ts
│   │   ├── createVueAppStore.ts
│   │   ├── getGlobalHooksForRouter.ts
│   │   ├── getGlobalRouteHooks.ts
│   │   ├── getInitialUrl.browser.spec.ts
│   │   ├── getInitialUrl.spec.ts
│   │   ├── getInitialUrl.ts
│   │   ├── getMatchesForUrl.spec.ts
│   │   ├── getMatchesForUrl.ts
│   │   ├── getParamsForString.ts
│   │   ├── getRejectionHooks.ts
│   │   ├── getRouteHooks.spec.ts
│   │   ├── getRouteHooks.ts
│   │   ├── getRoutesForRouter.spec.ts
│   │   ├── getRoutesForRouter.ts
│   │   ├── history.browser.spec.ts
│   │   ├── history.ts
│   │   ├── hooks.browser.spec.ts
│   │   ├── hooks.spec.ts
│   │   ├── hooks.ts
│   │   ├── insertBaseRoute.spec.ts
│   │   ├── insertBaseRoute.ts
│   │   ├── literal.ts
│   │   ├── params.spec.ts
│   │   ├── params.ts
│   │   ├── paramsFinder.spec.ts
│   │   ├── paramsFinder.ts
│   │   ├── queryParamFilter.spec.ts
│   │   ├── queryParamFilter.ts
│   │   ├── routeRegex.spec.ts
│   │   ├── routeRegex.ts
│   │   ├── state.spec.ts
│   │   ├── state.ts
│   │   ├── tupleOf.spec.ts
│   │   ├── tupleOf.ts
│   │   ├── unionOf.spec.ts
│   │   ├── unionOf.ts
│   │   ├── urlParser.spec.ts
│   │   ├── urlParser.ts
│   │   ├── valibot.spec-d.ts
│   │   ├── valibot.spec.ts
│   │   ├── valibot.ts
│   │   ├── withDefault.ts
│   │   ├── withParams.spec-d.ts
│   │   ├── withParams.spec.ts
│   │   ├── withParams.ts
│   │   ├── zod.spec-d.ts
│   │   ├── zod.spec.ts
│   │   └── zod.ts
│   ├── tests/
│   │   ├── hooks.spec.ts
│   │   ├── routeProps.browser.spec.ts
│   │   └── routeProps.spec.ts
│   ├── types/
│   │   ├── callbackContext.ts
│   │   ├── createRouteOptions.ts
│   │   ├── hooks.ts
│   │   ├── meta.ts
│   │   ├── name.ts
│   │   ├── paramTypes.ts
│   │   ├── params.ts
│   │   ├── prefetch.ts
│   │   ├── props.ts
│   │   ├── querySource.ts
│   │   ├── redirects.spec-d.ts
│   │   ├── redirects.ts
│   │   ├── register.spec.ts
│   │   ├── register.ts
│   │   ├── rejection.ts
│   │   ├── resolved.spec-d.ts
│   │   ├── resolved.ts
│   │   ├── route.spec-d.ts
│   │   ├── route.ts
│   │   ├── routeContext.ts
│   │   ├── routeTitle.browser.spec.ts
│   │   ├── routeTitle.ts
│   │   ├── routeUpdate.ts
│   │   ├── routeWithParams.spec-d.ts
│   │   ├── routeWithParams.ts
│   │   ├── router.ts
│   │   ├── routerAbort.ts
│   │   ├── routerLink.ts
│   │   ├── routerPlugin.ts
│   │   ├── routerPush.ts
│   │   ├── routerReject.ts
│   │   ├── routerReplace.ts
│   │   ├── routerResolve.ts
│   │   ├── routerRoute.ts
│   │   ├── routesMap.spec-ts.ts
│   │   ├── routesMap.ts
│   │   ├── state.ts
│   │   ├── url.ts
│   │   ├── urlString.ts
│   │   ├── useLink.ts
│   │   └── utilities.ts
│   └── utilities/
│       ├── array.ts
│       ├── checkDuplicateNames.spec.ts
│       ├── checkDuplicateNames.ts
│       ├── checkDuplicateParams.spec.ts
│       ├── checkDuplicateParams.ts
│       ├── components.spec.ts
│       ├── components.ts
│       ├── guards.spec.ts
│       ├── guards.ts
│       ├── index.ts
│       ├── isBrowser.browser.spec.ts
│       ├── isBrowser.spec.ts
│       ├── isBrowser.ts
│       ├── isNamedRoute.ts
│       ├── makeOptional.ts
│       ├── prefetch.spec.ts
│       ├── prefetch.ts
│       ├── promises.ts
│       ├── props.ts
│       ├── setDocumentTitle.ts
│       ├── testHelpers.ts
│       ├── trailingSlashes.spec.ts
│       ├── trailingSlashes.ts
│       ├── urlSearchParams.spec.ts
│       └── urlSearchParams.ts
├── tsconfig.json
├── typedoc.mjs
├── typedoc.tsconfig.json
└── vite.config.js
Download .txt
SYMBOL INDEX (727 symbols across 165 files)

FILE: scripts/api.js
  function renameTypeAliasesFolderToTypes (line 4) | async function renameTypeAliasesFolderToTypes() {
  function updateReferences (line 28) | async function updateReferences(searchString, replaceString) {
  function organizeFilesByGroup (line 53) | async function organizeFilesByGroup() {

FILE: src/components/rejection.ts
  function genericRejection (line 3) | function genericRejection(type: string): Component {

FILE: src/components/routerLink.ts
  type RouterLinkSlots (line 9) | type RouterLinkSlots = {
  function createRouterLink (line 22) | function createRouterLink<TRouter extends Router>(routerKey: InjectionKe...

FILE: src/components/routerView.ts
  type RouterViewProps (line 11) | type RouterViewProps = {
  type RouterViewSlots (line 15) | type RouterViewSlots = {
  function createRouterView (line 25) | function createRouterView<TRouter extends Router>(routerKey: InjectionKe...

FILE: src/compositions/useComponentsStore.ts
  function createUseComponentsStore (line 9) | function createUseComponentsStore<TRouter extends Router>(routerKey: Inj...

FILE: src/compositions/useEventListener.ts
  function useEventListener (line 3) | function useEventListener<K extends keyof HTMLElementEventMap>(element: ...

FILE: src/compositions/useLink.ts
  type UseLinkArgs (line 15) | type UseLinkArgs<
  type UseLinkFunction (line 23) | type UseLinkFunction<TRouter extends Router> = {
  function createUseLink (line 30) | function createUseLink<TRouter extends Router>(routerKey: InjectionKey<T...

FILE: src/compositions/usePrefetching.ts
  type UsePrefetchingConfig (line 12) | type UsePrefetchingConfig = PrefetchConfigs & {
  type UsePrefetching (line 16) | type UsePrefetching = {
  type UsePrefetchingFunction (line 21) | type UsePrefetchingFunction = (config: MaybeRefOrGetter<UsePrefetchingCo...
  function createUsePrefetching (line 23) | function createUsePrefetching<TRouter extends Router>(routerKey: Injecti...
  function prefetchComponentsForRoute (line 91) | function prefetchComponentsForRoute(strategy: PrefetchStrategy, route: R...

FILE: src/compositions/usePropStore.ts
  type UsePropStore (line 9) | type UsePropStore = () => PropStore
  function createUsePropStore (line 11) | function createUsePropStore<TRouter extends Router>(routerKey: Injection...

FILE: src/compositions/useQueryValue.browser.spec.ts
  method setup (line 21) | setup() {
  method setup (line 50) | setup() {
  method setup (line 79) | setup() {
  method setup (line 108) | setup() {
  method setup (line 137) | setup() {
  method setup (line 171) | setup() {
  method setup (line 208) | setup() {
  method setup (line 240) | setup() {
  method setup (line 272) | setup() {

FILE: src/compositions/useQueryValue.ts
  type UseQueryValue (line 9) | type UseQueryValue<T> = {
  type UseQueryValueFunction (line 15) | type UseQueryValueFunction = {
  function createUseQueryValue (line 25) | function createUseQueryValue<TRouter extends Router>(key: InjectionKey<T...

FILE: src/compositions/useRejection.ts
  function createUseRejection (line 10) | function createUseRejection(routerKey: InjectionKey<Router>): () => Rout...

FILE: src/compositions/useRoute.browser.spec.ts
  method setup (line 17) | setup() {
  method setup (line 42) | setup() {
  method setup (line 67) | setup() {
  method setup (line 92) | setup() {
  method setup (line 119) | setup() {

FILE: src/compositions/useRoute.ts
  type UseRouteFunction (line 8) | type UseRouteFunction<TRouter extends Router> = {
  function createUseRoute (line 19) | function createUseRoute(routerKey: InjectionKey<Router>): (routeName?: s...

FILE: src/compositions/useRouter.ts
  function createUseRouter (line 5) | function createUseRouter<TRouter extends Router>(routerKey: InjectionKey...

FILE: src/compositions/useRouterDepth.ts
  type UseRouterDepthProps (line 7) | type UseRouterDepthProps = {
  type UseRouterDepthFunction (line 11) | type UseRouterDepthFunction = (props?: UseRouterDepthProps) => number
  function createUseRouterDepth (line 13) | function createUseRouterDepth<TRouter extends Router>(routerKey: Injecti...

FILE: src/compositions/useRouterHooks.ts
  function createUseRouterHooks (line 6) | function createUseRouterHooks<TRouter extends Router>(routerKey: Injecti...

FILE: src/compositions/useVisibilityObserver.ts
  type UseVisibilityObserver (line 5) | type UseVisibilityObserver = {
  function useVisibilityObserver (line 11) | function useVisibilityObserver(element: Ref<Element | undefined>): UseVi...

FILE: src/devtools/createRouterDevtools.ts
  constant CYAN_400 (line 16) | const CYAN_400 = 0x22d3ee
  constant GREEN_500 (line 17) | const GREEN_500 = 0x22c55e
  constant GREEN_600 (line 18) | const GREEN_600 = 0x16a34a
  type RouteMatchOptions (line 20) | type RouteMatchOptions = {
  function getInspectorNodeForRoute (line 28) | function getInspectorNodeForRoute(
  function getRouteMatchStatus (line 69) | function getRouteMatchStatus(
  function getInspectorStateOptionsForRoute (line 87) | function getInspectorStateOptionsForRoute(route: Route): CustomInspector...
  type RouterDevtoolsProps (line 132) | type RouterDevtoolsProps = {
  function setupRouterDevtools (line 141) | function setupRouterDevtools({ router, app, routes }: RouterDevtoolsProp...

FILE: src/devtools/filters.ts
  type RouteFilterOptions (line 5) | type RouteFilterOptions = {
  type RouteFilter (line 10) | type RouteFilter = (options: RouteFilterOptions) => boolean

FILE: src/devtools/getDevtoolsLabel.ts
  function getDevtoolsLabel (line 13) | function getDevtoolsLabel(label: string, routerId: string): string {

FILE: src/devtools/types.ts
  type ExtractAPIFromCallback (line 4) | type ExtractAPIFromCallback = Parameters<Parameters<typeof setupDevtools...
  type ExtractInspectorTreeHandler (line 5) | type ExtractInspectorTreeHandler = Parameters<ExtractAPIFromCallback['on...
  type ExtractInspectorStateHandler (line 6) | type ExtractInspectorStateHandler = Parameters<ExtractAPIFromCallback['o...
  type ExtractInspectorStatePayload (line 7) | type ExtractInspectorStatePayload = Parameters<ExtractInspectorStateHand...
  type InspectorTreePayload (line 10) | type InspectorTreePayload = Parameters<ExtractInspectorTreeHandler>[0]
  type CustomInspectorNode (line 11) | type CustomInspectorNode = InspectorTreePayload['rootNodes'][number]
  type InspectorNodeTag (line 12) | type InspectorNodeTag = NonNullable<CustomInspectorNode['tags']>[number]
  type CustomInspectorState (line 13) | type CustomInspectorState = ExtractInspectorStatePayload['state']

FILE: src/errors/contextAbortError.ts
  class ContextAbortError (line 4) | class ContextAbortError extends ContextError {
    method constructor (line 7) | public constructor() {

FILE: src/errors/contextError.ts
  class ContextError (line 1) | class ContextError extends Error {}

FILE: src/errors/contextPushError.ts
  class ContextPushError (line 5) | class ContextPushError extends ContextError {
    method constructor (line 8) | public constructor(to: unknown[]) {

FILE: src/errors/contextRejectionError.ts
  class ContextRejectionError (line 4) | class ContextRejectionError extends ContextError {
    method constructor (line 7) | public constructor(type: string) {

FILE: src/errors/duplicateNamesError.ts
  class DuplicateNamesError (line 5) | class DuplicateNamesError extends Error {
    method constructor (line 10) | public constructor(name: string) {

FILE: src/errors/duplicateParamsError.ts
  class DuplicateParamsError (line 7) | class DuplicateParamsError extends Error {
    method constructor (line 12) | public constructor(paramName: string) {

FILE: src/errors/initialRouteMissingError.ts
  class InitialRouteMissingError (line 1) | class InitialRouteMissingError extends Error {
    method constructor (line 2) | public constructor() {

FILE: src/errors/invalidRouteParamValueError.ts
  type InvalidRouteParamValueErrorContext (line 3) | type InvalidRouteParamValueErrorContext = {
  class InvalidRouteParamValueError (line 12) | class InvalidRouteParamValueError extends Error {
    method constructor (line 15) | public constructor(context: InvalidRouteParamValueErrorContext = {}) {

FILE: src/errors/invalidRouteRedirectError.ts
  class InvalidRouteRedirectError (line 5) | class InvalidRouteRedirectError extends Error {
    method constructor (line 10) | public constructor(routeName: string) {

FILE: src/errors/metaPropertyConflict.ts
  class MetaPropertyConflict (line 6) | class MetaPropertyConflict extends Error {
    method constructor (line 7) | public constructor(property?: string) {

FILE: src/errors/multipleRouteRedirectsError.ts
  class MultipleRouteRedirectsError (line 7) | class MultipleRouteRedirectsError extends Error {
    method constructor (line 12) | public constructor(routeName: string) {

FILE: src/errors/routeNotFoundError.ts
  class RouteNotFoundError (line 4) | class RouteNotFoundError extends Error {
    method constructor (line 5) | public constructor(source: string) {

FILE: src/errors/routerNotInstalledError.ts
  class RouterNotInstalledError (line 5) | class RouterNotInstalledError extends Error {
    method constructor (line 6) | public constructor() {

FILE: src/errors/useRouteInvalidError.ts
  class UseRouteInvalidError (line 5) | class UseRouteInvalidError extends Error {
    method constructor (line 12) | public constructor(routeName: string, actualRouteName: string) {

FILE: src/guards/routes.ts
  type IsRouteOptions (line 6) | type IsRouteOptions = {
  type RouteWithMatch (line 10) | type RouteWithMatch<
  type IsRouteFunction (line 19) | type IsRouteFunction<TRouter extends Router> = {
  function createIsRoute (line 62) | function createIsRoute<TRouter extends Router>(routerKey: InjectionKey<T...

FILE: src/main.ts
  type GlobalComponents (line 221) | interface GlobalComponents {

FILE: src/models/hooks.ts
  class Hooks (line 4) | class Hooks {

FILE: src/services/arrayOf.ts
  type ArrayOfOptions (line 5) | type ArrayOfOptions = {
  function arrayOf (line 13) | function arrayOf<const T extends Param[]>(params: T, options: ArrayOfOpt...

FILE: src/services/combineHash.ts
  type CombineHash (line 4) | type CombineHash<
  function combineHash (line 10) | function combineHash(parentHash: UrlPart, childHash: UrlPart): UrlPart {

FILE: src/services/combineMeta.ts
  type CombineMeta (line 3) | type CombineMeta<
  function combineMeta (line 9) | function combineMeta(parentMeta: Record<string, unknown>, childMeta: Rec...
  function checkForConflicts (line 15) | function checkForConflicts(parentMeta: Record<string, unknown>, childMet...

FILE: src/services/combinePath.spec-d.ts
  type Source (line 11) | type Source = typeof response
  type Expect (line 12) | type Expect = UrlPart<{}>
  type Source (line 23) | type Source = typeof response
  type Expect (line 24) | type Expect = UrlPart<{
  type Source (line 37) | type Source = typeof response
  type Expect (line 38) | type Expect = UrlPart<{
  type Source (line 51) | type Source = typeof response
  type Expect (line 52) | type Expect = UrlPart<{
  type Source (line 65) | type Source = typeof response
  type Expect (line 66) | type Expect = UrlPart<{
  type Source (line 79) | type Source = typeof response
  type Expect (line 80) | type Expect = UrlPart<{

FILE: src/services/combinePath.ts
  type CombinePath (line 5) | type CombinePath<
  function combinePath (line 17) | function combinePath(parentPath: UrlPart, childPath: UrlPart): UrlPart {

FILE: src/services/combineQuery.ts
  type CombineQuery (line 6) | type CombineQuery<
  function combineQuery (line 18) | function combineQuery(parentQuery: UrlPart, childQuery: UrlPart): UrlPart {

FILE: src/services/combineState.ts
  type CombineState (line 4) | type CombineState<
  function combineState (line 10) | function combineState(parentState: Record<string, Param>, childState: Re...

FILE: src/services/combineUrl.ts
  type CombineUrl (line 9) | type CombineUrl<
  function combineUrl (line 20) | function combineUrl(parent: Url & UrlInternal, child: Url & UrlInternal ...

FILE: src/services/component.browser.spec.ts
  method setup (line 69) | setup() {

FILE: src/services/component.ts
  type Constructor (line 10) | type Constructor = new (...args: any) => any
  type ComponentProps (line 12) | type ComponentProps<TComponent extends Component> = TComponent extends C...
  type CreateComponentWrapperConfig (line 20) | type CreateComponentWrapperConfig = {
  function createComponentPropsWrapper (line 26) | function createComponentPropsWrapper(routerKey: InjectionKey<Router>, { ...

FILE: src/services/createComponentHooks.ts
  function createComponentHook (line 15) | function createComponentHook(routerKey: symbol, lifecycle: HookLifecycle...
  type ComponentHooks (line 31) | type ComponentHooks<
  function createComponentHooks (line 41) | function createComponentHooks<TRouter extends Router>(routerKey: Injecti...

FILE: src/services/createComponentsStore.ts
  type ComponentsStore (line 8) | type ComponentsStore = {
  function createComponentsStore (line 12) | function createComponentsStore<TRouter extends Router>(routerKey: Inject...
  function getAllComponentsForMatch (line 34) | function getAllComponentsForMatch(routerKey: InjectionKey<Router>, optio...
  function wrapAllComponents (line 48) | function wrapAllComponents(routerKey: InjectionKey<Router>, match: Creat...

FILE: src/services/createCurrentRejection.ts
  type RejectionUpdate (line 6) | type RejectionUpdate = (rejection: Rejection) => void
  type RejectionClear (line 7) | type RejectionClear = () => void
  type CurrentRejectionContext (line 9) | type CurrentRejectionContext = {
  function createCurrentRejection (line 16) | function createCurrentRejection(): CurrentRejectionContext {

FILE: src/services/createCurrentRoute.ts
  type ResolvedRouteUpdate (line 8) | type ResolvedRouteUpdate = (route: ResolvedRoute) => void
  type CurrentRouteContext (line 10) | type CurrentRouteContext<TRoutes extends Routes = Routes> = {
  function createCurrentRoute (line 17) | function createCurrentRoute(routerKey: InjectionKey<Router>, fallbackRou...

FILE: src/services/createExternalRoute.ts
  function createExternalRoute (line 28) | function createExternalRoute(options: CreateRouteOptions & (WithoutHost ...

FILE: src/services/createIsExternal.ts
  function createIsExternal (line 3) | function createIsExternal(host: string | undefined): (url: string) => bo...

FILE: src/services/createParam.ts
  function createParam (line 9) | function createParam<TParam extends Param>(param: TParam, defaultValue?:...

FILE: src/services/createPropStore.ts
  type ComponentProps (line 15) | type ComponentProps = { id: string, name: string, props?: PropsGetter }
  type SetPropsResponse (line 17) | type SetPropsResponse = CallbackContextSuccess | CallbackContextPush | C...
  type PropStore (line 19) | type PropStore = HasVueAppStore & {
  function createPropStore (line 26) | function createPropStore(): PropStore {

FILE: src/services/createRejection.ts
  function createRejection (line 14) | function createRejection({ type, component }: { type: string, component?...

FILE: src/services/createRejectionHooks.ts
  type RejectionHooks (line 5) | type RejectionHooks<
  function createRejectionHooks (line 13) | function createRejectionHooks(): RejectionHooks {

FILE: src/services/createResolvedRoute.ts
  function createResolvedRoute (line 8) | function createResolvedRoute(route: Route, params: Record<string, unknow...
  function getRouteTitle (line 32) | async function getRouteTitle(route: ResolvedRoute): Promise<string | und...

FILE: src/services/createResolvedRouteQuery.ts
  function createResolvedRouteQuery (line 6) | function createResolvedRouteQuery(query?: QuerySource): URLSearchParams {

FILE: src/services/createRoute.spec-d.ts
  type Source (line 17) | type Source = typeof route
  type Source (line 26) | type Source = typeof route['name']
  type Expect (line 27) | type Expect = 'foo'
  type Source (line 39) | type Source = typeof route['name']
  type Expect (line 40) | type Expect = 'child'
  type Source (line 47) | type Source = typeof route['params']
  type Expect (line 48) | type Expect = { bar: { param: StringConstructor, isOptional: false, isGr...
  type Source (line 63) | type Source = typeof route['params']
  type Expect (line 64) | type Expect = {
  type Source (line 77) | type Source = typeof route['params']
  type Expect (line 78) | type Expect = {
  type Source (line 95) | type Source = typeof route['params']
  type Expect (line 96) | type Expect = {
  type Source (line 109) | type Source = typeof route['params']
  type Expect (line 110) | type Expect = {}
  type Source (line 125) | type Source = typeof route['params']
  type Expect (line 126) | type Expect = {}
  type Source (line 133) | type Source = typeof route['params']
  type Expect (line 134) | type Expect = { bar: { param: StringConstructor, isOptional: false, isGr...
  type Source (line 149) | type Source = typeof route['params']
  type Expect (line 150) | type Expect = {
  type Source (line 160) | type Source = typeof route['params']
  type Expect (line 161) | type Expect = { bar: { param: NumberConstructor, isOptional: false, isGr...
  type Source (line 176) | type Source = typeof route['params']
  type Expect (line 177) | type Expect = {
  type Source (line 188) | type Source = typeof route['params']
  type Expect (line 189) | type Expect = {}
  type Source (line 198) | type Source = typeof route['params']
  type Expect (line 199) | type Expect = {}
  type Source (line 206) | type Source = typeof route['meta']
  type Expect (line 207) | type Expect = Readonly<{ foo: 'bar' }>
  type Source (line 216) | type Source = Identity<typeof route['meta']>
  type Expect (line 217) | type Expect = Readonly<{ parent: 'parent', child: 'child' }>
  type Source (line 224) | type Source = typeof route['state']
  type Expect (line 225) | type Expect = Readonly<{ foo: StringConstructor }>
  type Source (line 234) | type Source = Identity<typeof route['state']>
  type Expect (line 235) | type Expect = Readonly<{ parent: StringConstructor, child: StringConstru...
  type Source (line 246) | type Source = typeof route['matched']['props']
  type Expect (line 247) | type Expect = undefined
  type Source (line 257) | type Source = typeof route['matched']['props']
  type Expect (line 258) | type Expect = () => { foo: string }
  type Source (line 269) | type Source = typeof route['matched']['props']
  type Expect (line 270) | type Expect = undefined
  type Source (line 280) | type Source = typeof route['matched']['props']
  type Expect (line 281) | type Expect = () => { value: string, extra: boolean }
  type Source (line 292) | type Source = typeof route['matched']['props']
  type Expect (line 293) | type Expect = undefined
  type Source (line 305) | type Source = typeof route['matched']['props']
  type Expect (line 306) | type Expect = undefined
  type Source (line 320) | type Source = typeof route['matched']['props']
  type Expect (line 321) | type Expect = { default: () => { foo: string } }
  type Source (line 334) | type Source = typeof route['matched']['props']
  type Expect (line 335) | type Expect = undefined
  type Source (line 349) | type Source = typeof route['matched']['props']
  type Expect (line 350) | type Expect = { default: () => { value: string, extra: boolean } }
  type Source (line 365) | type Source = typeof route['matched']['props']
  type Expect (line 366) | type Expect = undefined
  type Source (line 377) | type Source = typeof route['matched']['props']
  type Expect (line 378) | type Expect = undefined
  type Source (line 491) | type Source = Parameters<typeof context.reject>[0]
  type Expect (line 492) | type Expect = BuiltInRejectionType
  type Source (line 510) | type Source = Parameters<typeof context.reject>[0]
  type Expect (line 511) | type Expect = 'NotAuthorized' | BuiltInRejectionType

FILE: src/services/createRoute.ts
  type CreateRouteWithProps (line 16) | type CreateRouteWithProps<
  function createRoute (line 37) | function createRoute(options: CreateRouteOptions, props?: CreateRoutePro...

FILE: src/services/createRouteHooks.ts
  type RouteHooks (line 8) | type RouteHooks<
  function createRouteHooks (line 24) | function createRouteHooks(): RouteHooks {

FILE: src/services/createRouteRedirects.ts
  type CreateRouteRedirectsContext (line 5) | type CreateRouteRedirectsContext = {
  function createRouteRedirects (line 12) | function createRouteRedirects({ getRoute }: CreateRouteRedirectsContext)...

FILE: src/services/createRouter.spec-d.ts
  type Routes (line 44) | type Routes = typeof routes | typeof pluginRoutes
  type Source (line 118) | type Source = Parameters<typeof _router.reject>[0]
  type Expect (line 119) | type Expect = BuiltInRejectionType
  type Source (line 134) | type Source = Parameters<typeof _router.reject>[0]
  type Expect (line 135) | type Expect = BuiltInRejectionType | 'MyCustomRejection'
  type Source (line 151) | type Source = Parameters<typeof _router.reject>[0]
  type Expect (line 152) | type Expect = BuiltInRejectionType | 'MyPluginRejection'

FILE: src/services/createRouter.ts
  type RouterUpdateOptions (line 44) | type RouterUpdateOptions = {
  function createRouter (line 84) | function createRouter<

FILE: src/services/createRouterAssets.ts
  type RouterAssets (line 14) | type RouterAssets<TRouter extends Router> = {
  function createRouterAssets (line 141) | function createRouterAssets<TRouter extends Router>(routerOrRouterKey: T...

FILE: src/services/createRouterCallbackContext.ts
  type CallbackContextAbort (line 16) | type CallbackContextAbort = () => void
  type RouterCallbackContext (line 18) | type RouterCallbackContext<
  function createRouterCallbackContext (line 34) | function createRouterCallbackContext({ to }: { to: ResolvedRoute }): Rou...

FILE: src/services/createRouterHistory.browser.spec.ts
  function noop (line 5) | function noop(): void {}

FILE: src/services/createRouterHistory.ts
  type NavigationPushOptions (line 4) | type NavigationPushOptions = {
  type NavigationUpdate (line 9) | type NavigationUpdate = (url: string, options?: NavigationPushOptions) =...
  type NavigationRefresh (line 10) | type NavigationRefresh = () => void
  type RouterHistory (line 12) | type RouterHistory = History & {
  type RouterHistoryMode (line 19) | type RouterHistoryMode = 'auto' | 'browser' | 'memory' | 'hash'
  type RouterHistoryOptions (line 21) | type RouterHistoryOptions = {
  function createRouterHistory (line 26) | function createRouterHistory({ mode, listener }: RouterHistoryOptions): ...
  function createHistory (line 64) | function createHistory(mode: RouterHistoryMode = 'auto'): History {

FILE: src/services/createRouterHooks.ts
  type RouterHooks (line 21) | type RouterHooks = HasVueAppStore & {
  function createRouterHooks (line 38) | function createRouterHooks(): RouterHooks {

FILE: src/services/createRouterKeyStore.ts
  function createRouterKeyStore (line 4) | function createRouterKeyStore<TValue>() {

FILE: src/services/createRouterPlugin.ts
  function createRouterPlugin (line 11) | function createRouterPlugin(options: CreateRouterPluginOptions): RouterP...

FILE: src/services/createRouterRoute.ts
  function isRouterRoute (line 12) | function isRouterRoute(routerKey: InjectionKey<Router>, value: unknown):...
  function createRouterRoute (line 16) | function createRouterRoute<TRoute extends ResolvedRoute>(routerKey: Inje...

FILE: src/services/createUniqueIdSequence.ts
  function createUniqueIdSequence (line 1) | function createUniqueIdSequence(): () => string {
  constant FIRST_SEQUENCE_ID (line 7) | const FIRST_SEQUENCE_ID = createUniqueIdSequence()()
  function isFirstUniqueSequenceId (line 9) | function isFirstUniqueSequenceId(id: string): boolean {

FILE: src/services/createUrl.ts
  function createUrl (line 12) | function createUrl(urlOrOptions: CreateUrlOptions): Url {
  function cleanHash (line 127) | function cleanHash(hash: UrlPart): UrlPart {
  function cleanQuery (line 134) | function cleanQuery(query: UrlPart): UrlPart {
  function assembleParamValues (line 141) | function assembleParamValues(part: UrlPart, paramValues: Record<string, ...
  function assembleQueryParamValues (line 147) | function assembleQueryParamValues(query: UrlPart, paramValues: Record<st...
  function getParams (line 176) | function getParams(path: UrlPart, url: string): Record<string, unknown> {
  function getQueryParams (line 196) | function getQueryParams(query: UrlPart, url: string): Record<string, unk...

FILE: src/services/createVisibilityObserver.ts
  type VisibilityObserver (line 4) | type VisibilityObserver = {
  function createVisibilityObserver (line 11) | function createVisibilityObserver(): VisibilityObserver {

FILE: src/services/createVueAppStore.ts
  type HasVueAppStore (line 3) | type HasVueAppStore = {
  type VueAppStore (line 7) | type VueAppStore = HasVueAppStore & {
  function createVueAppStore (line 11) | function createVueAppStore(): VueAppStore {

FILE: src/services/getGlobalHooksForRouter.ts
  function getGlobalHooksForRouter (line 4) | function getGlobalHooksForRouter(plugins: RouterPlugin[] = []): Hooks {

FILE: src/services/getGlobalRouteHooks.ts
  function getGlobalBeforeHooks (line 5) | function getGlobalBeforeHooks(to: ResolvedRoute, from: ResolvedRoute | n...
  function getGlobalAfterHooks (line 27) | function getGlobalAfterHooks(to: ResolvedRoute, from: ResolvedRoute | nu...

FILE: src/services/getInitialUrl.ts
  function getInitialUrl (line 4) | function getInitialUrl(initialUrl?: string): string {

FILE: src/services/getMatchesForUrl.ts
  type MatchOptions (line 9) | type MatchOptions = { state?: Partial<unknown> } & ParseUrlOptions
  function getMatchForUrl (line 11) | function getMatchForUrl(routes: Routes, url: string, options: MatchOptio...

FILE: src/services/getParamsForString.ts
  function getParamsForString (line 9) | function getParamsForString(string: string = '', params: Record<string, ...

FILE: src/services/getRejectionHooks.ts
  function getRejectionHooksFromRejection (line 5) | function getRejectionHooksFromRejection(rejection: Rejection): Hooks {

FILE: src/services/getRouteHooks.ts
  function getBeforeHooksFromRoutes (line 6) | function getBeforeHooksFromRoutes(to: ResolvedRoute, from: ResolvedRoute...
  function getAfterHooksFromRoutes (line 30) | function getAfterHooksFromRoutes(to: ResolvedRoute, from: ResolvedRoute ...

FILE: src/services/getRoutesForRouter.ts
  function getRoutesForRouter (line 17) | function getRoutesForRouter(routes: Routes | Routes[], plugins: RouterPl...
  function isRoutes (line 116) | function isRoutes(routes: Routes | Route): routes is Routes {
  function isRejections (line 120) | function isRejections(rejections: Rejections | Rejection): rejections is...
  function sortByDepthDescending (line 124) | function sortByDepthDescending(aRoute: Route & RouteInternal, bRoute: Ro...

FILE: src/services/history.ts
  type Action (line 1) | type Action = 'POP' | 'PUSH' | 'REPLACE'
  type Pathname (line 2) | type Pathname = string
  type Search (line 3) | type Search = string
  type Hash (line 4) | type Hash = string
  type Key (line 5) | type Key = string
  type Path (line 7) | interface Path {
  type Location (line 13) | interface Location extends Path {
  type Update (line 18) | interface Update {
  type Listener (line 23) | type Listener = (update: Update) => void
  type Transition (line 25) | interface Transition extends Update {
  type Blocker (line 29) | type Blocker = (tx: Transition) => void
  type To (line 31) | type To = string | Partial<Path>
  type History (line 33) | interface History {
  type BrowserHistory (line 46) | interface BrowserHistory extends History {}
  type HashHistory (line 48) | interface HashHistory extends History {}
  type MemoryHistory (line 50) | interface MemoryHistory extends History {
  type BrowserHistoryOptions (line 54) | type BrowserHistoryOptions = {
  type HashHistoryOptions (line 58) | type HashHistoryOptions = {
  type InitialEntry (line 62) | type InitialEntry = string | Partial<Location>
  type MemoryHistoryOptions (line 64) | type MemoryHistoryOptions = {
  function createEvents (line 71) | function createEvents<T>(): {
  function createKey (line 93) | function createKey(): string {
  function clamp (line 99) | function clamp(n: number, lowerBound: number, upperBound: number): number {
  function promptBeforeUnload (line 103) | function promptBeforeUnload(event: BeforeUnloadEvent): void {
  function createPath (line 110) | function createPath({ pathname = '/', search = '', hash = '' }: Partial<...
  function parsePath (line 117) | function parsePath(path: string): Partial<Path> {
  function readOnly (line 143) | function readOnly<T extends object>(obj: T): Readonly<T> {
  function createBrowserHistory (line 153) | function createBrowserHistory(options: BrowserHistoryOptions = {}): Brow...
  function createHashHistory (line 333) | function createHashHistory(options: HashHistoryOptions = {}): HashHistory {
  function createMemoryHistory (line 532) | function createMemoryHistory(options: MemoryHistoryOptions = {}): Memory...

FILE: src/services/hooks.ts
  type RouteHookCondition (line 4) | type RouteHookCondition = (to: ResolvedRoute, from: ResolvedRoute | null...
  function getRouteHookCondition (line 24) | function getRouteHookCondition(lifecycle: HookLifecycle): RouteHookCondi...

FILE: src/services/insertBaseRoute.ts
  function insertBaseRoute (line 6) | function insertBaseRoute<T extends Route>(route: T, base?: string): T {

FILE: src/services/literal.ts
  function literal (line 4) | function literal(param: LiteralParam): ParamGetSet {

FILE: src/services/params.ts
  function getParam (line 11) | function getParam(params: Record<string, Param | undefined>, paramName: ...
  function getParamExtras (line 15) | function getParamExtras(seed: InvalidRouteParamValueErrorContext): Param...
  function getParamValue (line 113) | function getParamValue(value: string | undefined, { param = String, isOp...
  function safeGetParamValue (line 178) | function safeGetParamValue<T extends Param>(value: string | undefined, p...
  function safeSetParamValue (line 189) | function safeSetParamValue(value: unknown, param: Partial<UrlParam>): st...
  function setParamValue (line 200) | function setParamValue(value: unknown, { param = String, isOptional = fa...

FILE: src/services/paramsFinder.ts
  function getParamValueFromUrl (line 5) | function getParamValueFromUrl(url: string, path: UrlPart, paramName: str...
  function setParamValueOnUrl (line 14) | function setParamValueOnUrl(url: string, path: UrlPart, paramName: strin...

FILE: src/services/queryParamFilter.ts
  function filterQueryParams (line 3) | function filterQueryParams(source: QuerySource, exclude: QuerySource): U...

FILE: src/services/routeRegex.ts
  function escapeRegExp (line 14) | function escapeRegExp(string: string): string {
  function splitByMatches (line 18) | function splitByMatches(string: string, regexp: RegExp): string[] {
  function generateRouteHostRegexPattern (line 48) | function generateRouteHostRegexPattern(host: string): RegExp {
  function generateRoutePathRegexPattern (line 54) | function generateRoutePathRegexPattern(path: string): RegExp {
  function generateRouteHashRegexPattern (line 60) | function generateRouteHashRegexPattern(hash: string): RegExp {
  function generateRouteQueryRegexPatterns (line 67) | function generateRouteQueryRegexPatterns(query: string): RegExp[] {
  function replaceParamSyntaxWithCatchAllsAndEscapeRest (line 80) | function replaceParamSyntaxWithCatchAllsAndEscapeRest(value: string): st...
  function replaceParamSyntaxWithCatchAlls (line 90) | function replaceParamSyntaxWithCatchAlls(value: string): string {
  function replaceIndividualParamWithCaptureGroup (line 96) | function replaceIndividualParamWithCaptureGroup(path: UrlPart, paramName...
  function isOptionalParamSyntax (line 104) | function isOptionalParamSyntax(value: string): boolean {
  function isRequiredParamSyntax (line 108) | function isRequiredParamSyntax(value: string): boolean {
  function isGreedyParamSyntax (line 112) | function isGreedyParamSyntax(value: string): boolean {
  function getParamName (line 116) | function getParamName(value: string): string | undefined {
  function getParamRegexPattern (line 122) | function getParamRegexPattern(paramName: string): RegExp {
  function getCaptureGroups (line 126) | function getCaptureGroups(value: string, pattern: RegExp): (string | und...

FILE: src/services/state.ts
  function stateIsRecord (line 4) | function stateIsRecord(state: unknown): state is Record<string, unknown> {
  function getStateValue (line 10) | function getStateValue(state: unknown, key: string, param: Param): unkno...
  function getStateValues (line 27) | function getStateValues(params: Record<string, Param>, state: unknown): ...
  function setStateValue (line 42) | function setStateValue(state: unknown, key: string, param: Param): strin...

FILE: src/services/tupleOf.ts
  type TupleOfOptions (line 5) | type TupleOfOptions = {
  type TupleOf (line 13) | type TupleOf<T extends Param[]> = { [K in keyof T]: ExtractParamType<T[K...
  function tupleOf (line 15) | function tupleOf<const T extends Param[]>(params: T, options: TupleOfOpt...

FILE: src/services/unionOf.spec.ts
  function throwsInvalidRouteParamValueError (line 6) | function throwsInvalidRouteParamValueError(): () => never {

FILE: src/services/unionOf.ts
  function unionOf (line 6) | function unionOf(params: Param[]): ParamGetSet {

FILE: src/services/urlParser.ts
  type UrlParts (line 6) | type UrlParts = {
  type UrlPartsInput (line 13) | type UrlPartsInput = {
  constant FALLBACK_HOST (line 21) | const FALLBACK_HOST = 'https://internal.invalid'
  function stringifyUrl (line 23) | function stringifyUrl(parts: UrlPartsInput): UrlString {
  function parseUrl (line 33) | function parseUrl(value: string): UrlParts {
  function updateUrl (line 41) | function updateUrl(url: string | Partial<UrlParts>, updates: UrlPartsInp...
  function createAbsoluteUrl (line 58) | function createAbsoluteUrl(value: string): UrlParts {
  function createRelativeUrl (line 66) | function createRelativeUrl(value: string): UrlParts {

FILE: src/services/valibot.spec-d.ts
  type Input (line 15) | type Input = ExtractParamType<typeof param>

FILE: src/services/valibot.spec.ts
  type Fruits (line 5) | enum Fruits {

FILE: src/services/valibot.ts
  type ValibotSchemaLike (line 6) | interface ValibotSchemaLike extends StandardSchemaV1<any> {
  function parse (line 12) | function parse(schema: ValibotSchemaLike, value: unknown) {
  function isValibotSchemaLike (line 26) | function isValibotSchemaLike(param: Param): param is ValibotSchemaLike {
  function isValibotParam (line 36) | function isValibotParam(value: Param): value is ValibotSchemaLike {
  function createValibotParam (line 40) | function createValibotParam<T>(schema: ValibotSchemaLike): ParamGetSet<T> {
  function reviver (line 61) | function reviver(_key: string, value: any): any {
  function tryAll (line 75) | function tryAll<T>(fns: (() => T)[]): T {
  function sortValibotSchemas (line 88) | function sortValibotSchemas(schemaA: ValibotSchemaLike, schemaB: Valibot...
  function parseValibotValue (line 92) | function parseValibotValue(value: string, schema: ValibotSchemaLike): un...
  function stringifyValibotValue (line 176) | function stringifyValibotValue(value: unknown, schema: ValibotSchemaLike...

FILE: src/services/withDefault.ts
  type ParamWithDefault (line 5) | type ParamWithDefault<TParam extends Param = Param> = Required<ParamGetS...
  function isParamWithDefault (line 7) | function isParamWithDefault(param: Param): param is ParamWithDefault {
  function withDefault (line 11) | function withDefault<TParam extends Param>(param: TParam, defaultValue: ...

FILE: src/services/withParams.spec-d.ts
  type Source (line 8) | type Source = typeof source
  type Expect (line 9) | type Expect = UrlPart<{}>
  type Source (line 17) | type Source = typeof source
  type Expect (line 18) | type Expect = UrlPart<{ param: { param: StringConstructor, isOptional: f...
  type Source (line 26) | type Source = typeof source
  type Expect (line 27) | type Expect = UrlPart<{ param: { param: BooleanConstructor, isOptional: ...
  type Source (line 34) | type Source = ToUrlPart<'test'>
  type Expect (line 35) | type Expect = UrlPart<{}>
  type Source (line 41) | type Source = ToUrlPart<undefined>
  type Expect (line 42) | type Expect = UrlPart<{}>
  type Source (line 48) | type Source = ToUrlPart<UrlPart<{ foo: { param: NumberConstructor, isOpt...
  type Expect (line 49) | type Expect = UrlPart<{ foo: { param: NumberConstructor, isOptional: fal...
  type Source (line 57) | type Source = ToUrlQueryPart<'foo=bar'>
  type Expect (line 58) | type Expect = UrlPart<{}>
  type Source (line 64) | type Source = ToUrlQueryPart<undefined>
  type Expect (line 65) | type Expect = UrlPart<{}>
  type Source (line 72) | type Source = ToUrlQueryPart<typeof query>
  type Expect (line 73) | type Expect = UrlPart<{ foo: { param: NumberConstructor, isOptional: fal...
  type Source (line 79) | type Source = ToUrlQueryPart<{ foo: 'bar', baz: 'qux' }>
  type Expect (line 80) | type Expect = UrlPart<{}>
  type Source (line 86) | type Source = ToUrlQueryPart<{ foo: NumberConstructor, baz: BooleanConst...
  type Expect (line 87) | type Expect = UrlPart<{
  type Source (line 96) | type Source = ToUrlQueryPart<{ 'foo': NumberConstructor, '?baz': Boolean...
  type Expect (line 97) | type Expect = UrlPart<{
  type Source (line 106) | type Source = ToUrlQueryPart<{ foo: NumberConstructor, baz: ParamWithDef...
  type Expect (line 107) | type Expect = {
  type Source (line 116) | type Source = ToUrlQueryPart<[['foo', 'bar'], ['baz', 'qux']]>
  type Expect (line 117) | type Expect = UrlPart<{}>
  type Source (line 123) | type Source = ToUrlQueryPart<[['foo', NumberConstructor], ['baz', Boolea...
  type Expect (line 124) | type Expect = UrlPart<{
  type Source (line 133) | type Source = ToUrlQueryPart<[['foo', NumberConstructor], ['?baz', Boole...
  type Expect (line 134) | type Expect = UrlPart<{
  type Source (line 143) | type Source = ToUrlQueryPart<[['foo', NumberConstructor], ['baz', ParamW...
  type Expect (line 144) | type Expect = {

FILE: src/services/withParams.ts
  type WithParamsParamsInput (line 9) | type WithParamsParamsInput<
  type WithParamsParamsOutput (line 15) | type WithParamsParamsOutput<
  type UrlParam (line 28) | type UrlParam<TParam extends Param = Param> = { param: TParam, isOptiona...
  type RequiredUrlParam (line 29) | type RequiredUrlParam<TParam extends Param = Param> = { param: TParam, i...
  type OptionalUrlParam (line 30) | type OptionalUrlParam<TParam extends Param = Param> = { param: TParam, i...
  type UrlParams (line 31) | type UrlParams = Record<string, UrlParam>
  type UrlPart (line 33) | type UrlPart<TParams extends UrlParams = UrlParams> = {
  type ToUrlPart (line 39) | type ToUrlPart<T extends string | UrlPart | undefined> = T extends string
  function isUrlPart (line 47) | function isUrlPart(maybeUrlPartsWithParams: unknown): maybeUrlPartsWithP...
  function toUrlPart (line 52) | function toUrlPart<T extends string | UrlPart | undefined>(value: T): Ur...
  function withParams (line 69) | function withParams(value?: string, params?: Record<string, Param | unde...
  type UrlQueryPart (line 87) | type UrlQueryPart = UrlPart | Record<string, Param> | [string, Param][]
  type ToUrlQueryPart (line 88) | type ToUrlQueryPart<T extends UrlQueryPart | string | undefined> = T ext...
  type QueryRecordToUrlPart (line 100) | type QueryRecordToUrlPart<T extends Record<string, Param>> = {
  type QueryArrayToUrlPart (line 104) | type QueryArrayToUrlPart<T extends [string, string | Param][]> = T exten...
  function toUrlQueryPart (line 113) | function toUrlQueryPart(querySource: UrlQueryPart): UrlPart {

FILE: src/services/zod.spec-d.ts
  type Input (line 15) | type Input = ExtractParamType<typeof param>

FILE: src/services/zod.spec.ts
  type Fruits (line 11) | enum Fruits {

FILE: src/services/zod.ts
  type ZodSchemaLike (line 8) | interface ZodSchemaLike extends StandardSchemaV1<any> {
  function getZodInstances (line 16) | async function getZodInstances() {
  type ZodSchemas (line 92) | type ZodSchemas = Awaited<ReturnType<typeof getZodInstances>>
  function zodParamsDetected (line 94) | function zodParamsDetected(routes: Routes): boolean {
  function isZodSchemaLike (line 106) | function isZodSchemaLike(param: Param): param is ZodSchemaLike {
  function initZod (line 116) | async function initZod(): Promise<void> {
  function isZodParam (line 124) | function isZodParam(value: unknown): value is ZodType {
  function createZodParam (line 132) | function createZodParam<T>(schema: ZodType<T>): ParamGetSet<T> {
  function reviver (line 153) | function reviver(_key: string, value: any): any {
  function tryAll (line 167) | function tryAll<T>(fns: (() => T)[]): T {
  function sortZodSchemas (line 180) | function sortZodSchemas(schemaA: ZodType, schemaB: ZodType): number {
  function parseZodValue (line 184) | function parseZodValue(value: string, schema: ZodType): unknown {
  function stringifyZodValue (line 278) | function stringifyZodValue(value: unknown, schema: ZodType): string {

FILE: src/tests/routeProps.browser.spec.ts
  method render (line 26) | render(props: { value: string }) {
  method render (line 42) | render(props: { value: string }) {

FILE: src/types/callbackContext.ts
  type CallbackContextSuccess (line 3) | type CallbackContextSuccess = {
  type CallbackContextPush (line 7) | type CallbackContextPush = {
  type CallbackContextReject (line 12) | type CallbackContextReject = {
  type CallbackContextAbort (line 17) | type CallbackContextAbort = {

FILE: src/types/createRouteOptions.ts
  type WithHost (line 22) | type WithHost<THost extends string | UrlPart = string | UrlPart> = {
  type WithoutHost (line 29) | type WithoutHost = {
  type WithParent (line 33) | type WithParent<TParent extends Route = Route> = {
  function isWithParent (line 37) | function isWithParent<T extends Record<string, unknown>>(options: T): op...
  type WithoutParent (line 41) | type WithoutParent = {
  type WithoutComponents (line 49) | type WithoutComponents = { component: never, components: never }
  function isWithComponent (line 51) | function isWithComponent<T extends Record<string, unknown>>(options: T):...
  function isWithComponentProps (line 55) | function isWithComponentProps<T extends Record<string, unknown>>(options...
  function isWithComponents (line 59) | function isWithComponents<T extends Record<string, unknown>>(options: T)...
  function isWithComponentPropsRecord (line 63) | function isWithComponentPropsRecord<T extends Record<string, unknown>>(o...
  type CreateRouteOptions (line 67) | type CreateRouteOptions<
  type PropsGetter (line 123) | type PropsGetter<
  type RouterViewPropsGetter (line 128) | type RouterViewPropsGetter<
  type ComponentPropsAreOptional (line 132) | type ComponentPropsAreOptional<
  type RoutePropsRecord (line 138) | type RoutePropsRecord<
  type CreateRouteProps (line 144) | type CreateRouteProps<
  type ToMatch (line 152) | type ToMatch<
  type ToMatches (line 165) | type ToMatches<
  type ToRoute (line 172) | type ToRoute<
  function combineRoutes (line 195) | function combineRoutes(parent: Route, child: Route): Route {

FILE: src/types/hooks.ts
  function getHooks (line 14) | function getHooks(value: Record<string, unknown> | undefined | null): Ho...
  function combineHooks (line 18) | function combineHooks(parent: Route, child: Route): Hooks[] {
  type InternalRouteHooks (line 22) | type InternalRouteHooks<
  type ExternalRouteHooks (line 52) | type ExternalRouteHooks<
  type RejectionHooks (line 62) | type RejectionHooks<
  type HookTiming (line 71) | type HookTiming = 'global' | 'component'
  type ComponentHook (line 76) | type ComponentHook = BeforeEnterHook | BeforeUpdateHook | BeforeLeaveHoo...
  type ComponentHookRegistration (line 81) | type ComponentHookRegistration = {
  type AddComponentHook (line 90) | type AddComponentHook = (registration: ComponentHookRegistration) => Hoo...
  type AddGlobalHooks (line 92) | type AddGlobalHooks = (hooks: Hooks) => void
  type HookRemove (line 97) | type HookRemove = () => void
  type BeforeHookLifecycle (line 102) | type BeforeHookLifecycle = 'onBeforeRouteEnter' | 'onBeforeRouteUpdate' ...
  type AfterHookLifecycle (line 107) | type AfterHookLifecycle = 'onAfterRouteEnter' | 'onAfterRouteUpdate' | '...
  type HookLifecycle (line 112) | type HookLifecycle = BeforeHookLifecycle | AfterHookLifecycle
  type AfterHookContext (line 114) | type AfterHookContext<
  type BeforeHookContext (line 125) | type BeforeHookContext<
  type BeforeEnterHookContext (line 137) | type BeforeEnterHookContext<
  type BeforeEnterHook (line 146) | type BeforeEnterHook<
  type AddBeforeEnterHook (line 153) | type AddBeforeEnterHook<
  type BeforeUpdateHookContext (line 160) | type BeforeUpdateHookContext<
  type BeforeUpdateHook (line 169) | type BeforeUpdateHook<
  type AddBeforeUpdateHook (line 176) | type AddBeforeUpdateHook<
  type BeforeLeaveHookContext (line 183) | type BeforeLeaveHookContext<
  type BeforeLeaveHook (line 192) | type BeforeLeaveHook<
  type AddBeforeLeaveHook (line 199) | type AddBeforeLeaveHook<
  type AfterEnterHookContext (line 206) | type AfterEnterHookContext<
  type AfterEnterHook (line 215) | type AfterEnterHook<
  type AddAfterEnterHook (line 222) | type AddAfterEnterHook<
  type AfterUpdateHookContext (line 229) | type AfterUpdateHookContext<
  type AfterUpdateHook (line 238) | type AfterUpdateHook<
  type AddAfterUpdateHook (line 245) | type AddAfterUpdateHook<
  type AfterLeaveHookContext (line 252) | type AfterLeaveHookContext<
  type AfterLeaveHook (line 261) | type AfterLeaveHook<
  type AddAfterLeaveHook (line 268) | type AddAfterLeaveHook<
  type BeforeHookResponse (line 275) | type BeforeHookResponse = CallbackContextSuccess | CallbackContextPush |...
  type AfterHookResponse (line 276) | type AfterHookResponse = CallbackContextSuccess | CallbackContextPush | ...
  type BeforeHookRunner (line 278) | type BeforeHookRunner = <TRoutes extends Routes>(
  type AfterHookRunner (line 282) | type AfterHookRunner = <TRoutes extends Routes>(
  type RejectionHookContext (line 286) | type RejectionHookContext<
  type RejectionHook (line 295) | type RejectionHook<
  type AddRejectionHook (line 302) | type AddRejectionHook<
  type RejectionHookRunner (line 309) | type RejectionHookRunner<TRejection extends Rejection = Rejection, TRout...
  type ErrorHookContext (line 314) | type ErrorHookContext<
  type ErrorHook (line 328) | type ErrorHook<
  type AddErrorHook (line 334) | type AddErrorHook<
  type ErrorHookRunnerContext (line 340) | type ErrorHookRunnerContext<TRoutes extends Routes = Routes> = {
  type ErrorHookRunner (line 346) | type ErrorHookRunner = (

FILE: src/types/meta.ts
  type EmptyMeta (line 3) | type EmptyMeta = Readonly<{}>
  type ToMeta (line 5) | type ToMeta<TMeta extends RouteMeta | undefined> = TMeta extends undefined

FILE: src/types/name.ts
  type ToName (line 1) | type ToName<T extends string | undefined> = T extends string ? T : ''
  function toName (line 4) | function toName<T extends string | undefined>(value: T): string {

FILE: src/types/paramTypes.ts
  type ParamExtras (line 4) | type ParamExtras = {
  type ParamGetter (line 8) | type ParamGetter<T = any> = (value: string, extras: ParamExtras) => T
  type ParamSetter (line 9) | type ParamSetter<T = any> = (value: T, extras: ParamExtras) => string
  type ParamGetSet (line 11) | type ParamGetSet<T = any> = {
  type LiteralParam (line 17) | type LiteralParam = string | number | boolean
  type Param (line 19) | type Param =

FILE: src/types/params.ts
  type ParamStart (line 5) | type ParamStart = typeof paramStart
  type ParamEnd (line 7) | type ParamEnd = typeof paramEnd
  function isNotConstructor (line 14) | function isNotConstructor(value: Param): boolean {
  function isParamGetter (line 23) | function isParamGetter(value: Param): value is ParamGetter {
  function isParamGetSet (line 32) | function isParamGetSet(value: Param): value is ParamGetSet {
  function isLiteralParam (line 45) | function isLiteralParam(value: Param): value is LiteralParam {
  type ExtractParamName (line 54) | type ExtractParamName<
  type ExtractParamType (line 75) | type ExtractParamType<TParam extends Param> =
  type ParamIsOptional (line 92) | type ParamIsOptional<TParam extends string> = TParam extends `?${string}...
  type ParamIsGreedy (line 93) | type ParamIsGreedy<TParam extends string> = TParam extends `${string}*` ...
  type ParamIsOptionalOrHasDefault (line 95) | type ParamIsOptionalOrHasDefault<TParamName extends string, TParam exten...

FILE: src/types/prefetch.ts
  type PrefetchStrategy (line 6) | type PrefetchStrategy = 'eager' | 'lazy' | 'intent'
  type PrefetchConfigOptions (line 8) | type PrefetchConfigOptions = {
  type PrefetchConfig (line 24) | type PrefetchConfig = boolean | PrefetchStrategy | PrefetchConfigOptions
  type PrefetchConfigs (line 26) | type PrefetchConfigs = {

FILE: src/types/props.ts
  type PropsCallbackContext (line 13) | type PropsCallbackContext<
  type PropsCallbackParent (line 24) | type PropsCallbackParent<
  type GetParentPropsReturnType (line 32) | type GetParentPropsReturnType<

FILE: src/types/querySource.ts
  type QuerySource (line 1) | type QuerySource = ConstructorParameters<typeof URLSearchParams>[0]

FILE: src/types/redirects.ts
  type RouteRedirects (line 8) | type RouteRedirects<
  type RedirectHookContext (line 21) | type RedirectHookContext<
  type RedirectHook (line 27) | type RedirectHook<
  type RouteRedirectCallback (line 32) | type RouteRedirectCallback<
  type RouteRedirect (line 40) | type RouteRedirect = (to: Route, callback?: (params: any) => any) => void
  type RedirectToArgs (line 42) | type RedirectToArgs<
  type RouteRedirectTo (line 49) | type RouteRedirectTo<
  type RedirectFromArgs (line 53) | type RedirectFromArgs<
  type RouteRedirectFrom (line 60) | type RouteRedirectFrom<

FILE: src/types/register.spec.ts
  type Meta (line 5) | type Meta = RouteMeta<{ routeMeta: { zoo: number } }>

FILE: src/types/register.ts
  type Register (line 17) | interface Register {}
  type RegisteredRouter (line 22) | type RegisteredRouter<T = Register> = T extends { router: infer TRouter }
  type RouteMeta (line 29) | type RouteMeta<T = Register> = T extends { routeMeta: infer RouteMeta ex...

FILE: src/types/rejection.ts
  constant BUILT_IN_REJECTION_TYPES (line 7) | const BUILT_IN_REJECTION_TYPES = ['NotFound'] as const
  type BuiltInRejectionType (line 8) | type BuiltInRejectionType = (typeof BUILT_IN_REJECTION_TYPES)[number]
  type RouterRejection (line 10) | type RouterRejection<T extends Rejection = Rejection> = Ref<T | null>
  type RouterRejections (line 11) | type RouterRejections<TRouter extends Router> = TRouter['reject'] extend...
  constant IS_REJECTION_SYMBOL (line 13) | const IS_REJECTION_SYMBOL = Symbol('IS_REJECTION_SYMBOL')
  function isRejection (line 15) | function isRejection(value: unknown): value is Rejection & RejectionInte...
  type RejectionInternal (line 19) | type RejectionInternal = {
  type Rejections (line 28) | type Rejections = readonly Rejection[]
  type Rejection (line 30) | type Rejection<TType extends string = string> = {
  type RejectionType (line 37) | type RejectionType<TRejections extends Rejections | undefined> =
  type ExtractRejections (line 48) | type ExtractRejections<T> = T extends { rejections: infer TRejections ex...
  type ExtractRejectionTypes (line 49) | type ExtractRejectionTypes<T extends Rejections> = T[number]['type'] ext...

FILE: src/types/resolved.spec-d.ts
  type TestRoute (line 14) | type TestRoute = typeof testRoute
  type Source (line 16) | type Source = RouterRoute<ResolvedRoute<TestRoute>>['params']
  type Expect (line 17) | type Expect = { paramA: string, paramB: boolean, paramC?: string | undef...
  type Source (line 23) | type Source = RouterRoute['params']
  type Expect (line 24) | type Expect = Record<string, unknown>

FILE: src/types/resolved.ts
  type ResolvedRoute (line 10) | type ResolvedRoute<TRoute extends Route = Route> = Readonly<{
  type RouterResolvedRouteUnion (line 57) | type RouterResolvedRouteUnion<TRoutes extends Routes> = {
  type ResolvedRouteUnion (line 70) | type ResolvedRouteUnion<TRoute extends Route> =

FILE: src/types/route.spec-d.ts
  type TestRoute (line 20) | type TestRoute = typeof testRoute
  type SourceWriting (line 22) | type SourceWriting = UrlParamsWriting<TestRoute>
  type SourceReading (line 23) | type SourceReading = UrlParamsReading<TestRoute>
  type Expect (line 24) | type Expect = { inHost: string, inPath: string, paramC?: string, inQuery...
  type TestRoute (line 40) | type TestRoute = typeof testRoute
  type SourceWriting (line 42) | type SourceWriting = UrlParamsWriting<TestRoute>
  type SourceReading (line 43) | type SourceReading = UrlParamsReading<TestRoute>

FILE: src/types/route.ts
  constant IS_ROUTE_SYMBOL (line 12) | const IS_ROUTE_SYMBOL = Symbol('IS_ROUTE_SYMBOL')
  function isRoute (line 14) | function isRoute(value: unknown): value is Route & RouteInternal {
  type RouteInternal (line 18) | type RouteInternal = {
  type Routes (line 29) | type Routes = readonly Route[]
  type CreatedRouteOptions (line 34) | type CreatedRouteOptions = Omit<CreateRouteOptions, 'props'> & {
  type Route (line 45) | type Route<
  type GenericRoute (line 88) | type GenericRoute = Url & {

FILE: src/types/routeContext.ts
  type RouteContext (line 5) | type RouteContext = GenericRoute | Rejection
  type ToRouteContext (line 7) | type ToRouteContext<TContext extends RouteContext[] | readonly RouteCont...
  type ExtractRouteContext (line 11) | type ExtractRouteContext<
  type ExtractRouteContextRoutes (line 21) | type ExtractRouteContextRoutes<
  type ExtractRouteContextRejections (line 25) | type ExtractRouteContextRejections<
  type RouteContextToRoute (line 29) | type RouteContextToRoute<TContext extends RouteContext[] | undefined> =
  type FilterRouteContextRoutes (line 36) | type FilterRouteContextRoutes<TContext extends RouteContext[] | undefine...
  type RouteContextToRejection (line 43) | type RouteContextToRejection<TContext extends RouteContext[] | undefined> =
  type FilterRouteContextRejections (line 50) | type FilterRouteContextRejections<TContext extends RouteContext[] | unde...

FILE: src/types/routeTitle.ts
  type SetRouteTitleContext (line 5) | type SetRouteTitleContext = {
  type SetRouteTitleCallback (line 10) | type SetRouteTitleCallback<TRoute extends Route = Route> = (to: Resolved...
  type GetRouteTitle (line 11) | type GetRouteTitle<TRoute extends Route = Route> = (to: ResolvedRouteUni...
  type SetRouteTitle (line 12) | type SetRouteTitle<TRoute extends Route = Route> = (callback: SetRouteTi...
  type RouteSetTitle (line 14) | type RouteSetTitle<TRoute extends Route = Route> = {
  type CreateRouteTitle (line 21) | type CreateRouteTitle = {
  function createRouteTitle (line 26) | function createRouteTitle(parent?: Route): CreateRouteTitle {

FILE: src/types/routeUpdate.ts
  type RouteUpdate (line 4) | type RouteUpdate<TRoute extends ResolvedRoute = ResolvedRoute> = Resolve...

FILE: src/types/routeWithParams.spec-d.ts
  type Routes (line 17) | type Routes = [typeof parentA, typeof childA]
  type Source (line 18) | type Source = RouteGetByKey<Routes, 'parentA.childA'>
  type Expect (line 19) | type Expect = typeof childA

FILE: src/types/routeWithParams.ts
  type RouteGetByKey (line 5) | type RouteGetByKey<TRoutes extends Routes, TKey extends RoutesName<TRout...
  type RouteParamsByKey (line 7) | type RouteParamsByKey<

FILE: src/types/router.ts
  type RouterOptions (line 20) | type RouterOptions = {
  type Router (line 67) | type Router<
  type RouterRouteUnion (line 187) | type RouterRouteUnion<TRoutes extends Routes> = {
  type RouterRoutes (line 191) | type RouterRoutes<TRouter extends Router> = TRouter extends Router<infer...
  type RouterRejections (line 195) | type RouterRejections<TRouter extends Router> = TRouter extends Router<a...
  type RouterRouteName (line 199) | type RouterRouteName<TRouter extends Router> = TRouter extends Router<in...

FILE: src/types/routerAbort.ts
  type RouterAbort (line 1) | type RouterAbort = () => void

FILE: src/types/routerLink.ts
  type ToCallback (line 7) | type ToCallback<TRouter extends Router> = (resolve: TRouter['resolve']) ...
  type RouterLinkProps (line 9) | type RouterLinkProps<TRouter extends Router> = RouterPushOptions & {

FILE: src/types/routerPlugin.ts
  type EmptyRouterPlugin (line 12) | type EmptyRouterPlugin = RouterPlugin<[], []>
  constant IS_ROUTER_PLUGIN_SYMBOL (line 14) | const IS_ROUTER_PLUGIN_SYMBOL = Symbol('IS_ROUTER_PLUGIN_SYMBOL')
  function isRouterPlugin (line 16) | function isRouterPlugin(value: unknown): value is RouterPlugin & RouterP...
  type RouterPluginInternal (line 20) | type RouterPluginInternal = {
  type CreateRouterPluginOptions (line 25) | type CreateRouterPluginOptions<
  type RouterPlugin (line 33) | type RouterPlugin<
  type PluginBeforeRouteHookContext (line 47) | type PluginBeforeRouteHookContext<
  type PluginAfterRouteHookContext (line 58) | type PluginAfterRouteHookContext<
  type PluginBeforeRouteHook (line 68) | type PluginBeforeRouteHook<
  type PluginAfterRouteHook (line 73) | type PluginAfterRouteHook<
  type AddPluginBeforeRouteHook (line 78) | type AddPluginBeforeRouteHook<
  type AddPluginAfterRouteHook (line 83) | type AddPluginAfterRouteHook<
  type PluginErrorHookContext (line 88) | type PluginErrorHookContext<
  type PluginErrorHook (line 100) | type PluginErrorHook<
  type AddPluginErrorHook (line 105) | type AddPluginErrorHook<
  type PluginRouteHooks (line 110) | type PluginRouteHooks<

FILE: src/types/routerPush.ts
  type RouterPushOptions (line 10) | type RouterPushOptions<
  type RouterPushArgs (line 31) | type RouterPushArgs<
  type RouterPush (line 38) | type RouterPush<

FILE: src/types/routerReject.ts
  type RouterReject (line 3) | type RouterReject<TRejections extends Rejections | undefined> =

FILE: src/types/routerReplace.ts
  type RouterReplaceOptions (line 10) | type RouterReplaceOptions<
  type RouterReplaceArgs (line 18) | type RouterReplaceArgs<
  type RouterReplace (line 25) | type RouterReplace<

FILE: src/types/routerResolve.ts
  type RouterResolveOptions (line 9) | type RouterResolveOptions<
  type RouterResolveArgs (line 17) | type RouterResolveArgs<
  type RouterResolve (line 24) | type RouterResolve<

FILE: src/types/routerRoute.ts
  type RouterRoute (line 5) | type RouterRoute<TRoute extends ResolvedRoute = ResolvedRoute> = {

FILE: src/types/routesMap.spec-ts.ts
  type Map (line 8) | type Map = RoutesMap<Route[]>
  type Source (line 10) | type Source = Map[keyof Map]['name']
  type Expect (line 11) | type Expect = string
  type Map (line 47) | type Map = RoutesMap<typeof routes>
  type Source (line 49) | type Source = keyof Map
  type Expect (line 50) | type Expect = 'foo' | 'zoofoo' | 'zoo'

FILE: src/types/routesMap.ts
  type IsRouteUnnamed (line 4) | type IsRouteUnnamed<T extends Route> = StringHasValue<T['name']> extends...
  type AsNamedRoute (line 5) | type AsNamedRoute<T extends Route> = IsRouteUnnamed<T> extends true ? ne...
  type RoutesMap (line 7) | type RoutesMap<TRoutes extends Routes = []> = {
  type RoutesName (line 11) | type RoutesName<TRoutes extends Routes> = string & keyof RoutesMap<TRoutes>

FILE: src/types/state.ts
  type ToState (line 8) | type ToState<TState extends Record<string, Param> | undefined> = TState ...
  type ExtractRouteStateParamsAsOptional (line 10) | type ExtractRouteStateParamsAsOptional<TParams extends Record<string, Pa...
  type RouteStateByName (line 14) | type RouteStateByName<
  type ExtractStateParams (line 19) | type ExtractStateParams<TRoute> = TRoute extends {
  type ExtractParamTypes (line 25) | type ExtractParamTypes<TParams extends Record<string, Param>> = Identity...

FILE: src/types/url.ts
  constant IS_URL_SYMBOL (line 8) | const IS_URL_SYMBOL = Symbol('IS_URL_SYMBOL')
  type UrlInternal (line 10) | type UrlInternal = {
  type CreateUrlOptions (line 16) | type CreateUrlOptions = {
  type ToUrl (line 23) | type ToUrl<
  function isUrl (line 32) | function isUrl(url: unknown): url is Url & UrlInternal {
  type ParseUrlOptions (line 36) | type ParseUrlOptions = {
  type Url (line 47) | type Url<TParams extends UrlParams = UrlParams> = {
  type UrlParamsArgs (line 71) | type UrlParamsArgs<
  type UrlParamsReading (line 82) | type UrlParamsReading<TUrl extends Url> = ToUrlParamsReading<TUrl['param...
  type ToUrlParamsReading (line 84) | type ToUrlParamsReading<
  type UrlParamsWriting (line 105) | type UrlParamsWriting<TUrl extends Url> = ToUrlParamsWriting<TUrl['param...
  type ToUrlParamsWriting (line 107) | type ToUrlParamsWriting<

FILE: src/types/urlString.ts
  type UrlString (line 1) | type UrlString = `http://${string}` | `https://${string}` | `/${string}`
  function isUrlString (line 9) | function isUrlString(value: unknown): value is UrlString {
  function asUrlString (line 24) | function asUrlString(value: string): UrlString {

FILE: src/types/useLink.ts
  type UseLink (line 8) | type UseLink = {
  type UseLinkOptions (line 51) | type UseLinkOptions = RouterPushOptions & {

FILE: src/types/utilities.ts
  type Identity (line 5) | type Identity<T> = T extends object ? {} & {
  type IsEmptyObject (line 9) | type IsEmptyObject<T> = T extends Record<string, never> ? (keyof T exten...
  type LastInArray (line 11) | type LastInArray<T, TFallback = never> = T extends [...any[], infer Last...
  type MaybePromise (line 13) | type MaybePromise<T> = T | Promise<T>
  type OnlyRequiredProperties (line 15) | type OnlyRequiredProperties<T> = {
  type AllPropertiesAreOptional (line 19) | type AllPropertiesAreOptional<T> = Record<string, unknown> extends T
  type AsString (line 28) | type AsString<T> = T extends string ? T : never

FILE: src/utilities/array.ts
  function getCount (line 1) | function getCount<T>(array: T[], item: T): number {

FILE: src/utilities/checkDuplicateNames.ts
  function checkDuplicateNames (line 4) | function checkDuplicateNames(routes: Routes): void {

FILE: src/utilities/checkDuplicateParams.ts
  function checkDuplicateParams (line 4) | function checkDuplicateParams(...withParams: (Record<string, unknown> | ...

FILE: src/utilities/components.ts
  type ComponentWithAsyncLoader (line 13) | type ComponentWithAsyncLoader = Component & { __asyncLoader: () => void }
  function isAsyncComponent (line 15) | function isAsyncComponent(component: Component): component is ComponentW...

FILE: src/utilities/guards.spec.ts
  type Source (line 32) | type Source = StringHasValue<''>
  type Expect (line 33) | type Expect = false
  type Source (line 39) | type Source = StringHasValue<string>
  type Expect (line 40) | type Expect = true
  type Source (line 46) | type Source = StringHasValue<any>
  type Expect (line 47) | type Expect = true
  type Source (line 53) | type Source = StringHasValue<undefined>
  type Expect (line 54) | type Expect = false
  type Source (line 60) | type Source = StringHasValue<'foo'>
  type Expect (line 61) | type Expect = true

FILE: src/utilities/guards.ts
  function isDefined (line 1) | function isDefined<T>(value: T | undefined): value is T {
  function isRecord (line 5) | function isRecord(value: unknown): value is Record<PropertyKey, unknown> {
  function isPropertyKey (line 9) | function isPropertyKey(value: unknown): value is PropertyKey {
  function hasProperty (line 13) | function hasProperty<
  function stringHasValue (line 31) | function stringHasValue(value: string | undefined): value is string {
  type StringHasValue (line 35) | type StringHasValue<T> = string extends T

FILE: src/utilities/isBrowser.ts
  function isBrowser (line 1) | function isBrowser(): boolean {

FILE: src/utilities/isNamedRoute.ts
  function isNamedRoute (line 4) | function isNamedRoute(route: Route): route is Route & { name: string } {

FILE: src/utilities/makeOptional.ts
  type WithOptionalProperties (line 1) | type WithOptionalProperties<T> = {
  type MakeOptional (line 5) | type MakeOptional<T> = {

FILE: src/utilities/prefetch.ts
  constant DEFAULT_PREFETCH_STRATEGY (line 4) | const DEFAULT_PREFETCH_STRATEGY: PrefetchStrategy = 'lazy'
  constant DEFAULT_PREFETCH_CONFIG (line 6) | const DEFAULT_PREFETCH_CONFIG: Required<PrefetchConfigOptions> = {
  function isPrefetchStrategy (line 11) | function isPrefetchStrategy(value: any): value is PrefetchStrategy {
  function getPrefetchOption (line 15) | function getPrefetchOption({ routerPrefetch, routePrefetch, linkPrefetch...
  function getPrefetchConfigValue (line 53) | function getPrefetchConfigValue(prefetch: PrefetchConfig | undefined, se...

FILE: src/utilities/promises.ts
  function isPromise (line 1) | function isPromise(value: unknown): value is Promise<unknown> {

FILE: src/utilities/props.ts
  function getPropsValue (line 8) | function getPropsValue(callback: () => unknown): unknown {

FILE: src/utilities/setDocumentTitle.ts
  function setDocumentTitle (line 7) | function setDocumentTitle(to: ResolvedRoute | null): void {

FILE: src/utilities/testHelpers.ts
  method number (line 4) | number(options: { min?: number, max?: number } = {}): number {
  function getError (line 12) | function getError(callback: () => any): unknown {

FILE: src/utilities/trailingSlashes.ts
  function removeTrailingSlashesFromPath (line 11) | function removeTrailingSlashesFromPath(url: string): string {
  function pathHasTrailingSlash (line 23) | function pathHasTrailingSlash(url: string): boolean {

FILE: src/utilities/urlSearchParams.ts
  function combineUrlSearchParams (line 3) | function combineUrlSearchParams(...paramGroups: (URLSearchParams | Query...
Condensed preview — 417 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (861K chars).
[
  {
    "path": ".github/FUNDING.yml",
    "chars": 34,
    "preview": "github: pleek91, stackoverfloweth\n"
  },
  {
    "path": ".github/dependabot.yml",
    "chars": 1265,
    "preview": "# To get started with Dependabot version updates, you'll need to specify which\n# package ecosystems to update and where "
  },
  {
    "path": ".github/workflows/auto-docs.yml",
    "chars": 1089,
    "preview": "name: Auto Generate Docs\n\non:\n  push:\n    tags:\n      - 'v*' # Trigger on version tags (v0.20.11, v1.0.0, etc.)\n  workfl"
  },
  {
    "path": ".github/workflows/notify-stars.yml",
    "chars": 624,
    "preview": "name: Stars Notification to Discord\n\non:\n  watch:\n    types: [started]\n\njobs:\n  notify:\n    name: Notify Discord\n    run"
  },
  {
    "path": ".github/workflows/release.yml",
    "chars": 350,
    "preview": "on:\n  push:\n    tags:\n      - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10\n\nname: Create Release\n\njobs:\n  rel"
  },
  {
    "path": ".github/workflows/test.yml",
    "chars": 454,
    "preview": "name: Tests\n\non: [pull_request]\n\njobs:\n  unit-tests:\n    name: Unit Tests\n    runs-on: ubuntu-latest\n\n    steps:\n      -"
  },
  {
    "path": ".gitignore",
    "chars": 194,
    "preview": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\n*.l"
  },
  {
    "path": ".nvmrc",
    "chars": 8,
    "preview": "v22.14.0"
  },
  {
    "path": ".vscode/settings.json",
    "chars": 384,
    "preview": "{\n  \"editor.formatOnSave\": false,\n  \"editor.codeActionsOnSave\": {\n    \"source.fixAll.eslint\": \"explicit\"\n  },\n  \"eslint."
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 1387,
    "preview": "# Code of Conduct for Kitbag\n\nAs contributors and maintainers of this project, we pledge to respect all people who contr"
  },
  {
    "path": "LICENSE",
    "chars": 1083,
    "preview": "MIT License\n\nCopyright (c) 2023-present, Craig Harshbarger\n\nPermission is hereby granted, free of charge, to any person "
  },
  {
    "path": "README.md",
    "chars": 3856,
    "preview": "# @kitbag/router\n\nType safe router for Vue.js\n\n[![NPM Version][npm-badge]][npm-url]\n[![Netlify Status][netlify-badge]][n"
  },
  {
    "path": "docs/.vitepress/config.ts",
    "chars": 4706,
    "preview": "import { defineConfig } from 'vitepress'\nimport typedocSidebar from '../api/typedoc-sidebar.json';\n\n// https://vitepress"
  },
  {
    "path": "docs/.vitepress/theme/index.js",
    "chars": 98,
    "preview": "import DefaultTheme from 'vitepress/theme'\nimport './styles/vars.css'\n\nexport default DefaultTheme"
  },
  {
    "path": "docs/.vitepress/theme/styles/vars.css",
    "chars": 1133,
    "preview": ":root {\n  --kitbag-orange-300: rgba(254, 168, 68, 1);\n  --kitbag-orange-500: rgba(212, 80, 66, 1);\n  --kitbag-orange-700"
  },
  {
    "path": "docs/advanced-concepts/hooks.md",
    "chars": 3987,
    "preview": "# Hooks\n\nHooks offer a way to register callbacks on router lifecycle events.  \n\n```ts\nonAfterRouteEnter: (to, context) ="
  },
  {
    "path": "docs/advanced-concepts/plugins.md",
    "chars": 578,
    "preview": "# Plugins\n\nPlugins are a way to extend the router with additional functionality. They are used to add routes and rejecti"
  },
  {
    "path": "docs/advanced-concepts/prefetching.md",
    "chars": 4001,
    "preview": "# Prefetching\n\nPrefetching is a powerful feature in Kitbag Router that allows your application to start loading dependen"
  },
  {
    "path": "docs/advanced-concepts/redirects.md",
    "chars": 3092,
    "preview": "# Redirects\n\nRedirects provide a declarative way to automatically redirect from one route to another. This is useful for"
  },
  {
    "path": "docs/advanced-concepts/rejections.md",
    "chars": 3610,
    "preview": "# Rejections\n\nKitbag Router ships with built in support for rejection handling. Each rejection type you need is register"
  },
  {
    "path": "docs/advanced-concepts/route-matching.md",
    "chars": 3782,
    "preview": "# Route Matching\n\nThere are several rules Kitbag Router uses to determine which of your routes corresponds to the curren"
  },
  {
    "path": "docs/advanced-concepts/route-meta.md",
    "chars": 1835,
    "preview": "# Route Meta\n\nIt may be useful to store additional information about your route to be used in a hook, or within a compon"
  },
  {
    "path": "docs/advanced-concepts/route-narrowing.md",
    "chars": 1681,
    "preview": "# Route Narrowing\n\nWhen accessing the current route or using the `useRoute` composable, by default the type is a union o"
  },
  {
    "path": "docs/advanced-concepts/route-state.md",
    "chars": 1692,
    "preview": "# Route State\n\nIt may be useful to store state for a given route to improve your user's experience. In situations like a"
  },
  {
    "path": "docs/api/components/RouterLink.md",
    "chars": 252,
    "preview": "# Components: RouterLink\n\n```ts\nconst RouterLink: RouterAssets<RegisteredRouter>[\"RouterLink\"];\n```\n\nA component to rend"
  },
  {
    "path": "docs/api/components/RouterView.md",
    "chars": 253,
    "preview": "# Components: RouterView\n\n```ts\nconst RouterView: RouterAssets<RegisteredRouter>[\"RouterView\"];\n```\n\nA component to rend"
  },
  {
    "path": "docs/api/compositions/useLink.md",
    "chars": 597,
    "preview": "# Compositions: useLink\n\n```ts\nconst useLink: RouterAssets<RegisteredRouter>[\"useLink\"];\n```\n\nA composition to export mu"
  },
  {
    "path": "docs/api/compositions/useQueryValue.md",
    "chars": 229,
    "preview": "# Compositions: useQueryValue\n\n```ts\nconst useQueryValue: RouterAssets<RegisteredRouter>[\"useQueryValue\"];\n```\n\nA compos"
  },
  {
    "path": "docs/api/compositions/useRejection.md",
    "chars": 208,
    "preview": "# Compositions: useRejection\n\n```ts\nconst useRejection: RouterAssets<RegisteredRouter>[\"useRejection\"];\n```\n\nA compositi"
  },
  {
    "path": "docs/api/compositions/useRoute.md",
    "chars": 1083,
    "preview": "# Compositions: useRoute\n\n```ts\nconst useRoute: RouterAssets<RegisteredRouter>[\"useRoute\"];\n```\n\nA composition to access"
  },
  {
    "path": "docs/api/compositions/useRouter.md",
    "chars": 367,
    "preview": "# Compositions: useRouter\n\n```ts\nconst useRouter: RouterAssets<RegisteredRouter>[\"useRouter\"];\n```\n\nA composition to acc"
  },
  {
    "path": "docs/api/errors/DuplicateParamsError.md",
    "chars": 3759,
    "preview": "# Errors: DuplicateParamsError\n\nAn error thrown when duplicate parameters are detected in a route.\nParam names must be u"
  },
  {
    "path": "docs/api/errors/MetaPropertyConflict.md",
    "chars": 3595,
    "preview": "# Errors: MetaPropertyConflict\n\nAn error thrown when a parent's meta has the same key as a child and the types are not c"
  },
  {
    "path": "docs/api/errors/RouterNotInstalledError.md",
    "chars": 3436,
    "preview": "# Errors: RouterNotInstalledError\n\nAn error thrown when an attempt is made to use routing functionality before the route"
  },
  {
    "path": "docs/api/errors/UseRouteInvalidError.md",
    "chars": 3893,
    "preview": "# Errors: UseRouteInvalidError\n\nAn error thrown when there is a mismatch between an expected route and the one actually "
  },
  {
    "path": "docs/api/functions/arrayOf.md",
    "chars": 424,
    "preview": "# Functions: arrayOf()\n\n```ts\nfunction arrayOf<T>(params, options?): ParamGetSet<ExtractParamType<T[number]>[]>;\n```\n\n##"
  },
  {
    "path": "docs/api/functions/asUrlString.md",
    "chars": 307,
    "preview": "# Functions: asUrlString()\n\n```ts\nfunction asUrlString(value): UrlString;\n```\n\nConverts a string to a valid URL.\n\n## Par"
  },
  {
    "path": "docs/api/functions/combineRoutes.md",
    "chars": 272,
    "preview": "# Functions: combineRoutes()\n\n```ts\nfunction combineRoutes(parent, child): Route;\n```\n\n## Parameters\n\n| Parameter | Type"
  },
  {
    "path": "docs/api/functions/createExternalRoute.md",
    "chars": 1575,
    "preview": "# Functions: createExternalRoute()\n\n## Call Signature\n\n```ts\nfunction createExternalRoute<TOptions>(options): ToRoute<TO"
  },
  {
    "path": "docs/api/functions/createParam.md",
    "chars": 1131,
    "preview": "# Functions: createParam()\n\n## Call Signature\n\n```ts\nfunction createParam<TParam>(param): TParam;\n```\n\n### Type Paramete"
  },
  {
    "path": "docs/api/functions/createRejection.md",
    "chars": 411,
    "preview": "# Functions: createRejection()\n\n```ts\nfunction createRejection<TType>(options): Rejection<TType>;\n```\n\n## Type Parameter"
  },
  {
    "path": "docs/api/functions/createRoute.md",
    "chars": 1018,
    "preview": "# Functions: createRoute()\n\n```ts\nfunction createRoute<TOptions, TProps>(options, ...args): ToRoute<TOptions, TProps> & "
  },
  {
    "path": "docs/api/functions/createRouter.md",
    "chars": 3132,
    "preview": "# Functions: createRouter()\n\n## Call Signature\n\n```ts\nfunction createRouter<TRoutes, TOptions, TPlugin>(\n   routes, \n   "
  },
  {
    "path": "docs/api/functions/createRouterAssets.md",
    "chars": 776,
    "preview": "# Functions: createRouterAssets()\n\n## Call Signature\n\n```ts\nfunction createRouterAssets<TRouter>(router): RouterAssets<T"
  },
  {
    "path": "docs/api/functions/createRouterPlugin.md",
    "chars": 734,
    "preview": "# Functions: createRouterPlugin()\n\n```ts\nfunction createRouterPlugin<TRoutes, TRejections>(plugin): RouterPlugin<TRoutes"
  },
  {
    "path": "docs/api/functions/createUrl.md",
    "chars": 324,
    "preview": "# Functions: createUrl()\n\n```ts\nfunction createUrl<T>(options): ToUrl<T>;\n```\n\n## Type Parameters\n\n| Type Parameter |\n| "
  },
  {
    "path": "docs/api/functions/isUrlWithSchema.md",
    "chars": 351,
    "preview": "# Functions: isUrlWithSchema()\n\n```ts\nfunction isUrlWithSchema(url): url is Url<UrlParams> & { schema: Record<string, Ur"
  },
  {
    "path": "docs/api/functions/isWithComponent.md",
    "chars": 354,
    "preview": "# Functions: isWithComponent()\n\n```ts\nfunction isWithComponent<T>(options): options is T & { component: Component };\n```"
  },
  {
    "path": "docs/api/functions/isWithComponentProps.md",
    "chars": 360,
    "preview": "# Functions: isWithComponentProps()\n\n```ts\nfunction isWithComponentProps<T>(options): options is T & { props: PropsGette"
  },
  {
    "path": "docs/api/functions/isWithComponentPropsRecord.md",
    "chars": 382,
    "preview": "# Functions: isWithComponentPropsRecord()\n\n```ts\nfunction isWithComponentPropsRecord<T>(options): options is T & { props"
  },
  {
    "path": "docs/api/functions/isWithComponents.md",
    "chars": 390,
    "preview": "# Functions: isWithComponents()\n\n```ts\nfunction isWithComponents<T>(options): options is T & { components: Record<string"
  },
  {
    "path": "docs/api/functions/isWithParent.md",
    "chars": 334,
    "preview": "# Functions: isWithParent()\n\n```ts\nfunction isWithParent<T>(options): options is T & WithParent<Route>;\n```\n\n## Type Par"
  },
  {
    "path": "docs/api/functions/literal.md",
    "chars": 326,
    "preview": "# Functions: literal()\n\n```ts\nfunction literal<T>(value): ParamGetSet<T>;\n```\n\n## Type Parameters\n\n| Type Parameter |\n| "
  },
  {
    "path": "docs/api/functions/tupleOf.md",
    "chars": 382,
    "preview": "# Functions: tupleOf()\n\n```ts\nfunction tupleOf<T>(params, options?): ParamGetSet<TupleOf<T>>;\n```\n\n## Type Parameters\n\n|"
  },
  {
    "path": "docs/api/functions/unionOf.md",
    "chars": 376,
    "preview": "# Functions: unionOf()\n\n```ts\nfunction unionOf<T>(params): ParamGetSet<ExtractParamType<T[number]>>;\n```\n\n## Type Parame"
  },
  {
    "path": "docs/api/functions/withDefault.md",
    "chars": 394,
    "preview": "# Functions: withDefault()\n\n```ts\nfunction withDefault<TParam>(param, defaultValue): ParamWithDefault<TParam>;\n```\n\n## T"
  },
  {
    "path": "docs/api/functions/withParams.md",
    "chars": 602,
    "preview": "# Functions: withParams()\n\n## Call Signature\n\n```ts\nfunction withParams<TValue, TParams>(value, params): UrlPart<WithPar"
  },
  {
    "path": "docs/api/hooks/onAfterRouteLeave.md",
    "chars": 413,
    "preview": "# Hooks: onAfterRouteLeave\n\n```ts\nconst onAfterRouteLeave: RouterAssets<RegisteredRouter>[\"onAfterRouteLeave\"];\n```\n\nReg"
  },
  {
    "path": "docs/api/hooks/onAfterRouteUpdate.md",
    "chars": 426,
    "preview": "# Hooks: onAfterRouteUpdate\n\n```ts\nconst onAfterRouteUpdate: RouterAssets<RegisteredRouter>[\"onAfterRouteUpdate\"];\n```\n\n"
  },
  {
    "path": "docs/api/hooks/onBeforeRouteLeave.md",
    "chars": 391,
    "preview": "# Hooks: onBeforeRouteLeave\n\n```ts\nconst onBeforeRouteLeave: RouterAssets<RegisteredRouter>[\"onBeforeRouteLeave\"];\n```\n\n"
  },
  {
    "path": "docs/api/hooks/onBeforeRouteUpdate.md",
    "chars": 419,
    "preview": "# Hooks: onBeforeRouteUpdate\n\n```ts\nconst onBeforeRouteUpdate: RouterAssets<RegisteredRouter>[\"onBeforeRouteUpdate\"];\n``"
  },
  {
    "path": "docs/api/index.md",
    "chars": 6840,
    "preview": "# @kitbag/router\n\n## Compositions\n\n- [useLink](compositions/useLink.md)\n- [useQueryValue](compositions/useQueryValue.md)"
  },
  {
    "path": "docs/api/interfaces/Register.md",
    "chars": 380,
    "preview": "# Interfaces: Register\n\nRepresents the state of currently registered router, and route meta. Used to provide correct typ"
  },
  {
    "path": "docs/api/type-guards/isRoute.md",
    "chars": 322,
    "preview": "# Type Guards: isRoute\n\n```ts\nconst isRoute: RouterAssets<RegisteredRouter>[\"isRoute\"];\n```\n\nA guard to verify if a rout"
  },
  {
    "path": "docs/api/type-guards/isUrlString.md",
    "chars": 362,
    "preview": "# Type Guards: isUrlString()\n\n```ts\nfunction isUrlString(value): value is UrlString;\n```\n\nA type guard for determining i"
  },
  {
    "path": "docs/api/typedoc-sidebar.json",
    "chars": 15211,
    "preview": "[\n  {\n    \"text\": \"Compositions\",\n    \"collapsed\": true,\n    \"items\": [\n      {\n        \"text\": \"useLink\",\n        \"link"
  },
  {
    "path": "docs/api/types/AddAfterEnterHook.md",
    "chars": 723,
    "preview": "# Types: AddAfterEnterHook()\\<TRoutes, TRejections, TRouteTo, TRouteFrom\\>\n\n```ts\ntype AddAfterEnterHook<TRoutes, TRejec"
  },
  {
    "path": "docs/api/types/AddAfterLeaveHook.md",
    "chars": 723,
    "preview": "# Types: AddAfterLeaveHook()\\<TRoutes, TRejections, TRouteTo, TRouteFrom\\>\n\n```ts\ntype AddAfterLeaveHook<TRoutes, TRejec"
  },
  {
    "path": "docs/api/types/AddAfterUpdateHook.md",
    "chars": 727,
    "preview": "# Types: AddAfterUpdateHook()\\<TRoutes, TRejections, TRouteTo, TRouteFrom\\>\n\n```ts\ntype AddAfterUpdateHook<TRoutes, TRej"
  },
  {
    "path": "docs/api/types/AddBeforeEnterHook.md",
    "chars": 727,
    "preview": "# Types: AddBeforeEnterHook()\\<TRoutes, TRejections, TRouteTo, TRouteFrom\\>\n\n```ts\ntype AddBeforeEnterHook<TRoutes, TRej"
  },
  {
    "path": "docs/api/types/AddBeforeLeaveHook.md",
    "chars": 727,
    "preview": "# Types: AddBeforeLeaveHook()\\<TRoutes, TRejections, TRouteTo, TRouteFrom\\>\n\n```ts\ntype AddBeforeLeaveHook<TRoutes, TRej"
  },
  {
    "path": "docs/api/types/AddBeforeUpdateHook.md",
    "chars": 731,
    "preview": "# Types: AddBeforeUpdateHook()\\<TRoutes, TRejections, TRouteTo, TRouteFrom\\>\n\n```ts\ntype AddBeforeUpdateHook<TRoutes, TR"
  },
  {
    "path": "docs/api/types/AddComponentHook.md",
    "chars": 351,
    "preview": "# Types: AddComponentHook()\n\n```ts\ntype AddComponentHook = (registration) => HookRemove;\n```\n\nFunction to add a componen"
  },
  {
    "path": "docs/api/types/AddErrorHook.md",
    "chars": 584,
    "preview": "# Types: AddErrorHook()\\<TRoute, TRoutes, TRejections\\>\n\n```ts\ntype AddErrorHook<TRoute, TRoutes, TRejections> = (hook) "
  },
  {
    "path": "docs/api/types/AddGlobalHooks.md",
    "chars": 175,
    "preview": "# Types: AddGlobalHooks()\n\n```ts\ntype AddGlobalHooks = (hooks) => void;\n```\n\n## Parameters\n\n| Parameter | Type |\n| -----"
  },
  {
    "path": "docs/api/types/AddPluginErrorHook.md",
    "chars": 517,
    "preview": "# Types: AddPluginErrorHook()\\<TRoutes, TRejections\\>\n\n```ts\ntype AddPluginErrorHook<TRoutes, TRejections> = (hook) => H"
  },
  {
    "path": "docs/api/types/AfterEnterHook.md",
    "chars": 815,
    "preview": "# Types: AfterEnterHook()\\<TRoutes, TRejections, TRouteTo, TRouteFrom\\>\n\n```ts\ntype AfterEnterHook<TRoutes, TRejections,"
  },
  {
    "path": "docs/api/types/AfterEnterHookContext.md",
    "chars": 648,
    "preview": "# Types: AfterEnterHookContext\\<TRoutes, TRejections, TRouteTo, TRouteFrom\\>\n\n```ts\ntype AfterEnterHookContext<TRoutes, "
  },
  {
    "path": "docs/api/types/AfterHookLifecycle.md",
    "chars": 187,
    "preview": "# Types: AfterHookLifecycle\n\n```ts\ntype AfterHookLifecycle = \"onAfterRouteEnter\" | \"onAfterRouteUpdate\" | \"onAfterRouteL"
  },
  {
    "path": "docs/api/types/AfterHookResponse.md",
    "chars": 133,
    "preview": "# Types: AfterHookResponse\n\n```ts\ntype AfterHookResponse = CallbackContextSuccess | CallbackContextPush | CallbackContex"
  },
  {
    "path": "docs/api/types/AfterHookRunner.md",
    "chars": 723,
    "preview": "# Types: AfterHookRunner()\n\n```ts\ntype AfterHookRunner = <TRoutes>(context) => Promise<AfterHookResponse>;\n```\n\n## Type "
  },
  {
    "path": "docs/api/types/AfterLeaveHook.md",
    "chars": 815,
    "preview": "# Types: AfterLeaveHook()\\<TRoutes, TRejections, TRouteTo, TRouteFrom\\>\n\n```ts\ntype AfterLeaveHook<TRoutes, TRejections,"
  },
  {
    "path": "docs/api/types/AfterLeaveHookContext.md",
    "chars": 641,
    "preview": "# Types: AfterLeaveHookContext\\<TRoutes, TRejections, TRouteTo, TRouteFrom\\>\n\n```ts\ntype AfterLeaveHookContext<TRoutes, "
  },
  {
    "path": "docs/api/types/AfterUpdateHook.md",
    "chars": 819,
    "preview": "# Types: AfterUpdateHook()\\<TRoutes, TRejections, TRouteTo, TRouteFrom\\>\n\n```ts\ntype AfterUpdateHook<TRoutes, TRejection"
  },
  {
    "path": "docs/api/types/AfterUpdateHookContext.md",
    "chars": 650,
    "preview": "# Types: AfterUpdateHookContext\\<TRoutes, TRejections, TRouteTo, TRouteFrom\\>\n\n```ts\ntype AfterUpdateHookContext<TRoutes"
  },
  {
    "path": "docs/api/types/BeforeEnterHook.md",
    "chars": 819,
    "preview": "# Types: BeforeEnterHook()\\<TRoutes, TRejections, TRouteTo, TRouteFrom\\>\n\n```ts\ntype BeforeEnterHook<TRoutes, TRejection"
  },
  {
    "path": "docs/api/types/BeforeEnterHookContext.md",
    "chars": 651,
    "preview": "# Types: BeforeEnterHookContext\\<TRoutes, TRejections, TRouteTo, TRouteFrom\\>\n\n```ts\ntype BeforeEnterHookContext<TRoutes"
  },
  {
    "path": "docs/api/types/BeforeHookLifecycle.md",
    "chars": 193,
    "preview": "# Types: BeforeHookLifecycle\n\n```ts\ntype BeforeHookLifecycle = \"onBeforeRouteEnter\" | \"onBeforeRouteUpdate\" | \"onBeforeR"
  },
  {
    "path": "docs/api/types/BeforeHookResponse.md",
    "chars": 169,
    "preview": "# Types: BeforeHookResponse\n\n```ts\ntype BeforeHookResponse = \n  | CallbackContextSuccess\n  | CallbackContextPush\n  | Cal"
  },
  {
    "path": "docs/api/types/BeforeHookRunner.md",
    "chars": 728,
    "preview": "# Types: BeforeHookRunner()\n\n```ts\ntype BeforeHookRunner = <TRoutes>(context) => Promise<BeforeHookResponse>;\n```\n\n## Ty"
  },
  {
    "path": "docs/api/types/BeforeLeaveHook.md",
    "chars": 819,
    "preview": "# Types: BeforeLeaveHook()\\<TRoutes, TRejections, TRouteTo, TRouteFrom\\>\n\n```ts\ntype BeforeLeaveHook<TRoutes, TRejection"
  },
  {
    "path": "docs/api/types/BeforeLeaveHookContext.md",
    "chars": 644,
    "preview": "# Types: BeforeLeaveHookContext\\<TRoutes, TRejections, TRouteTo, TRouteFrom\\>\n\n```ts\ntype BeforeLeaveHookContext<TRoutes"
  },
  {
    "path": "docs/api/types/BeforeUpdateHook.md",
    "chars": 823,
    "preview": "# Types: BeforeUpdateHook()\\<TRoutes, TRejections, TRouteTo, TRouteFrom\\>\n\n```ts\ntype BeforeUpdateHook<TRoutes, TRejecti"
  },
  {
    "path": "docs/api/types/BeforeUpdateHookContext.md",
    "chars": 653,
    "preview": "# Types: BeforeUpdateHookContext\\<TRoutes, TRejections, TRouteTo, TRouteFrom\\>\n\n```ts\ntype BeforeUpdateHookContext<TRout"
  },
  {
    "path": "docs/api/types/ComponentHook.md",
    "chars": 219,
    "preview": "# Types: ComponentHook\n\n```ts\ntype ComponentHook = \n  | BeforeEnterHook\n  | BeforeUpdateHook\n  | BeforeLeaveHook\n  | Aft"
  },
  {
    "path": "docs/api/types/ComponentHookRegistration.md",
    "chars": 385,
    "preview": "# Types: ComponentHookRegistration\n\n```ts\ntype ComponentHookRegistration = object;\n```\n\nRegistration object for adding a"
  },
  {
    "path": "docs/api/types/CreateRouteOptions.md",
    "chars": 1864,
    "preview": "# Types: CreateRouteOptions\\<TName, TMeta\\>\n\n```ts\ntype CreateRouteOptions<TName, TMeta> = object;\n```\n\n## Type Paramete"
  },
  {
    "path": "docs/api/types/CreateRouteProps.md",
    "chars": 511,
    "preview": "# Types: CreateRouteProps\\<TOptions\\>\n\n```ts\ntype CreateRouteProps<TOptions> = TOptions[\"component\"] extends Component ?"
  },
  {
    "path": "docs/api/types/CreateRouterPluginOptions.md",
    "chars": 494,
    "preview": "# Types: CreateRouterPluginOptions\\<TRoutes, TRejections\\>\n\n```ts\ntype CreateRouterPluginOptions<TRoutes, TRejections> ="
  },
  {
    "path": "docs/api/types/CreateUrlOptions.md",
    "chars": 348,
    "preview": "# Types: CreateUrlOptions\n\n```ts\ntype CreateUrlOptions = object;\n```\n\n## Properties\n\n| Property | Type |\n| ------ | ----"
  },
  {
    "path": "docs/api/types/CreatedRouteOptions.md",
    "chars": 345,
    "preview": "# Types: CreatedRouteOptions\n\n```ts\ntype CreatedRouteOptions = Omit<CreateRouteOptions, \"props\"> & object;\n```\n\nThe Rout"
  },
  {
    "path": "docs/api/types/EmptyRouterPlugin.md",
    "chars": 85,
    "preview": "# Types: EmptyRouterPlugin\n\n```ts\ntype EmptyRouterPlugin = RouterPlugin<[], []>;\n```\n"
  },
  {
    "path": "docs/api/types/ErrorHook.md",
    "chars": 600,
    "preview": "# Types: ErrorHook()\\<TRoute, TRoutes, TRejections\\>\n\n```ts\ntype ErrorHook<TRoute, TRoutes, TRejections> = (error, conte"
  },
  {
    "path": "docs/api/types/ErrorHookContext.md",
    "chars": 1086,
    "preview": "# Types: ErrorHookContext\\<TRoute, TRoutes, TRejections\\>\n\n```ts\ntype ErrorHookContext<TRoute, TRoutes, TRejections> = o"
  },
  {
    "path": "docs/api/types/ErrorHookRunner.md",
    "chars": 258,
    "preview": "# Types: ErrorHookRunner()\n\n```ts\ntype ErrorHookRunner = (error, context) => void;\n```\n\n## Parameters\n\n| Parameter | Typ"
  },
  {
    "path": "docs/api/types/ErrorHookRunnerContext.md",
    "chars": 572,
    "preview": "# Types: ErrorHookRunnerContext\\<TRoutes\\>\n\n```ts\ntype ErrorHookRunnerContext<TRoutes> = object;\n```\n\n## Type Parameters"
  },
  {
    "path": "docs/api/types/ExternalRouteHooks.md",
    "chars": 700,
    "preview": "# Types: ExternalRouteHooks\\<TRoute, TContext\\>\n\n```ts\ntype ExternalRouteHooks<TRoute, TContext> = object;\n```\n\n## Type "
  },
  {
    "path": "docs/api/types/GenericRoute.md",
    "chars": 452,
    "preview": "# Types: GenericRoute\n\n```ts\ntype GenericRoute = Url & object;\n```\n\n## Type Declaration\n\n### depth\n\n```ts\ndepth: number;"
  },
  {
    "path": "docs/api/types/HookLifecycle.md",
    "chars": 153,
    "preview": "# Types: HookLifecycle\n\n```ts\ntype HookLifecycle = \n  | BeforeHookLifecycle\n  | AfterHookLifecycle;\n```\n\nUnion type for "
  },
  {
    "path": "docs/api/types/HookRemove.md",
    "chars": 136,
    "preview": "# Types: HookRemove()\n\n```ts\ntype HookRemove = () => void;\n```\n\nA function to remove a previously added route hook.\n\n## "
  },
  {
    "path": "docs/api/types/HookTiming.md",
    "chars": 73,
    "preview": "# Types: HookTiming\n\n```ts\ntype HookTiming = \"global\" | \"component\";\n```\n"
  },
  {
    "path": "docs/api/types/InternalRouteHooks.md",
    "chars": 2160,
    "preview": "# Types: InternalRouteHooks\\<TRoute, TContext\\>\n\n```ts\ntype InternalRouteHooks<TRoute, TContext> = object;\n```\n\n## Type "
  },
  {
    "path": "docs/api/types/LiteralParam.md",
    "chars": 80,
    "preview": "# Types: LiteralParam\n\n```ts\ntype LiteralParam = string | number | boolean;\n```\n"
  },
  {
    "path": "docs/api/types/Param.md",
    "chars": 237,
    "preview": "# Types: Param\n\n```ts\ntype Param = \n  | ParamGetter\n  | ParamGetSet\n  | RegExp\n  | BooleanConstructor\n  | NumberConstruc"
  },
  {
    "path": "docs/api/types/ParamExtras.md",
    "chars": 176,
    "preview": "# Types: ParamExtras\n\n```ts\ntype ParamExtras = object;\n```\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a "
  },
  {
    "path": "docs/api/types/ParamGetSet.md",
    "chars": 402,
    "preview": "# Types: ParamGetSet\\<T\\>\n\n```ts\ntype ParamGetSet<T> = object;\n```\n\n## Type Parameters\n\n| Type Parameter | Default type "
  },
  {
    "path": "docs/api/types/ParamGetter.md",
    "chars": 318,
    "preview": "# Types: ParamGetter()\\<T\\>\n\n```ts\ntype ParamGetter<T> = (value, extras) => T;\n```\n\n## Type Parameters\n\n| Type Parameter"
  },
  {
    "path": "docs/api/types/ParamSetter.md",
    "chars": 323,
    "preview": "# Types: ParamSetter()\\<T\\>\n\n```ts\ntype ParamSetter<T> = (value, extras) => string;\n```\n\n## Type Parameters\n\n| Type Para"
  },
  {
    "path": "docs/api/types/ParseUrlOptions.md",
    "chars": 352,
    "preview": "# Types: ParseUrlOptions\n\n```ts\ntype ParseUrlOptions = object;\n```\n\n## Properties\n\n| Property | Type | Description |\n| -"
  },
  {
    "path": "docs/api/types/PluginAfterRouteHook.md",
    "chars": 571,
    "preview": "# Types: PluginAfterRouteHook()\\<TRoutes, TRejections\\>\n\n```ts\ntype PluginAfterRouteHook<TRoutes, TRejections> = (to, co"
  },
  {
    "path": "docs/api/types/PluginBeforeRouteHook.md",
    "chars": 574,
    "preview": "# Types: PluginBeforeRouteHook()\\<TRoutes, TRejections\\>\n\n```ts\ntype PluginBeforeRouteHook<TRoutes, TRejections> = (to, "
  },
  {
    "path": "docs/api/types/PluginErrorHook.md",
    "chars": 533,
    "preview": "# Types: PluginErrorHook()\\<TRoutes, TRejections\\>\n\n```ts\ntype PluginErrorHook<TRoutes, TRejections> = (error, context) "
  },
  {
    "path": "docs/api/types/PluginErrorHookContext.md",
    "chars": 844,
    "preview": "# Types: PluginErrorHookContext\\<TRoutes, TRejections\\>\n\n```ts\ntype PluginErrorHookContext<TRoutes, TRejections> = objec"
  },
  {
    "path": "docs/api/types/PluginRouteHooks.md",
    "chars": 1633,
    "preview": "# Types: PluginRouteHooks\\<TRoutes, TRejections\\>\n\n```ts\ntype PluginRouteHooks<TRoutes, TRejections> = object;\n```\n\n## T"
  },
  {
    "path": "docs/api/types/PrefetchConfig.md",
    "chars": 205,
    "preview": "# Types: PrefetchConfig\n\n```ts\ntype PrefetchConfig = \n  | boolean\n  | PrefetchStrategy\n  | PrefetchConfigOptions;\n```\n\nD"
  },
  {
    "path": "docs/api/types/PrefetchConfigOptions.md",
    "chars": 531,
    "preview": "# Types: PrefetchConfigOptions\n\n```ts\ntype PrefetchConfigOptions = object;\n```\n\n## Properties\n\n| Property | Type | Descr"
  },
  {
    "path": "docs/api/types/PrefetchConfigs.md",
    "chars": 387,
    "preview": "# Types: PrefetchConfigs\n\n```ts\ntype PrefetchConfigs = object;\n```\n\n## Properties\n\n| Property | Type |\n| ------ | ------"
  },
  {
    "path": "docs/api/types/PrefetchStrategy.md",
    "chars": 184,
    "preview": "# Types: PrefetchStrategy\n\n```ts\ntype PrefetchStrategy = \"eager\" | \"lazy\" | \"intent\";\n```\n\nDetermines when assets are pr"
  },
  {
    "path": "docs/api/types/PropsCallbackContext.md",
    "chars": 1061,
    "preview": "# Types: PropsCallbackContext\\<TRoute, TOptions\\>\n\n```ts\ntype PropsCallbackContext<TRoute, TOptions> = object;\n```\n\nCont"
  },
  {
    "path": "docs/api/types/PropsCallbackParent.md",
    "chars": 397,
    "preview": "# Types: PropsCallbackParent\\<TParent\\>\n\n```ts\ntype PropsCallbackParent<TParent> = Route | undefined extends TParent ? \n"
  },
  {
    "path": "docs/api/types/PropsGetter.md",
    "chars": 739,
    "preview": "# Types: PropsGetter()\\<TOptions, TComponent\\>\n\n```ts\ntype PropsGetter<TOptions, TComponent> = (route, context) => Maybe"
  },
  {
    "path": "docs/api/types/QuerySource.md",
    "chars": 101,
    "preview": "# Types: QuerySource\n\n```ts\ntype QuerySource = ConstructorParameters<typeof URLSearchParams>[0];\n```\n"
  },
  {
    "path": "docs/api/types/RegisteredRouter.md",
    "chars": 308,
    "preview": "# Types: RegisteredRouter\\<T\\>\n\n```ts\ntype RegisteredRouter<T> = T extends object ? TRouter : Router;\n```\n\nRepresents th"
  },
  {
    "path": "docs/api/types/ResolvedRoute.md",
    "chars": 651,
    "preview": "# Types: ResolvedRoute\\<TRoute\\>\n\n```ts\ntype ResolvedRoute<TRoute> = Readonly<{\n  hash: string;\n  hooks: Hooks[];\n  href"
  },
  {
    "path": "docs/api/types/ResolvedRouteUnion.md",
    "chars": 702,
    "preview": "# Types: ResolvedRouteUnion\\<TRoute\\>\n\n```ts\ntype ResolvedRouteUnion<TRoute> = TRoute extends Route ? ResolvedRoute<TRou"
  },
  {
    "path": "docs/api/types/Route.md",
    "chars": 2549,
    "preview": "# Types: Route\\<TName, TUrl, TMeta, TState, TMatches, TContext\\>\n\n```ts\ntype Route<TName, TUrl, TMeta, TState, TMatches,"
  },
  {
    "path": "docs/api/types/RouteMeta.md",
    "chars": 331,
    "preview": "# Types: RouteMeta\\<T\\>\n\n```ts\ntype RouteMeta<T> = T extends object ? RouteMeta : Record<string, unknown>;\n```\n\nRepresen"
  },
  {
    "path": "docs/api/types/Router.md",
    "chars": 4857,
    "preview": "# Types: Router\\<TRoutes, TOptions, TPlugin\\>\n\n```ts\ntype Router<TRoutes, TOptions, TPlugin> = object;\n```\n\n## Type Para"
  },
  {
    "path": "docs/api/types/RouterAssets.md",
    "chars": 4998,
    "preview": "# Types: RouterAssets\\<TRouter\\>\n\n```ts\ntype RouterAssets<TRouter> = object;\n```\n\n## Type Parameters\n\n| Type Parameter |"
  },
  {
    "path": "docs/api/types/RouterLinkProps.md",
    "chars": 552,
    "preview": "# Types: RouterLinkProps\\<TRouter\\>\n\n```ts\ntype RouterLinkProps<TRouter> = RouterPushOptions & object;\n```\n\n## Type Decl"
  },
  {
    "path": "docs/api/types/RouterOptions.md",
    "chars": 1586,
    "preview": "# Types: RouterOptions\n\n```ts\ntype RouterOptions = object;\n```\n\nOptions to initialize a [Router](Router.md) instance.\n\n#"
  },
  {
    "path": "docs/api/types/RouterPlugin.md",
    "chars": 691,
    "preview": "# Types: RouterPlugin\\<TRoutes, TRejections\\>\n\n```ts\ntype RouterPlugin<TRoutes, TRejections> = object;\n```\n\n## Type Para"
  },
  {
    "path": "docs/api/types/RouterPush.md",
    "chars": 1194,
    "preview": "# Types: RouterPush()\\<TRoutes\\>\n\n```ts\ntype RouterPush<TRoutes> = {\n<TSource>  (name, ...args): Promise<void>;\n  (route"
  },
  {
    "path": "docs/api/types/RouterPushOptions.md",
    "chars": 635,
    "preview": "# Types: RouterPushOptions\\<TState\\>\n\n```ts\ntype RouterPushOptions<TState> = object;\n```\n\n## Type Parameters\n\n| Type Par"
  },
  {
    "path": "docs/api/types/RouterReject.md",
    "chars": 449,
    "preview": "# Types: RouterReject()\\<TRejections\\>\n\n```ts\ntype RouterReject<TRejections> = <TSource>(type) => void;\n```\n\n## Type Par"
  },
  {
    "path": "docs/api/types/RouterRejections.md",
    "chars": 304,
    "preview": "# Types: RouterRejections\\<TRouter\\>\n\n```ts\ntype RouterRejections<TRouter> = TRouter extends Router<any, infer TOptions,"
  },
  {
    "path": "docs/api/types/RouterReplace.md",
    "chars": 1183,
    "preview": "# Types: RouterReplace()\\<TRoutes\\>\n\n```ts\ntype RouterReplace<TRoutes> = {\n<TSource>  (name, ...args): Promise<void>;\n  "
  },
  {
    "path": "docs/api/types/RouterReplaceOptions.md",
    "chars": 414,
    "preview": "# Types: RouterReplaceOptions\\<TState\\>\n\n```ts\ntype RouterReplaceOptions<TState> = object;\n```\n\n## Type Parameters\n\n| Ty"
  },
  {
    "path": "docs/api/types/RouterResolve.md",
    "chars": 507,
    "preview": "# Types: RouterResolve()\\<TRoutes\\>\n\n```ts\ntype RouterResolve<TRoutes> = <TSource>(name, ...args) => ResolvedRoute;\n```\n"
  },
  {
    "path": "docs/api/types/RouterResolveOptions.md",
    "chars": 414,
    "preview": "# Types: RouterResolveOptions\\<TState\\>\n\n```ts\ntype RouterResolveOptions<TState> = object;\n```\n\n## Type Parameters\n\n| Ty"
  },
  {
    "path": "docs/api/types/RouterResolvedRouteUnion.md",
    "chars": 343,
    "preview": "# Types: RouterResolvedRouteUnion\\<TRoutes\\>\n\n```ts\ntype RouterResolvedRouteUnion<TRoutes> = { [K in keyof TRoutes]: Res"
  },
  {
    "path": "docs/api/types/RouterRoute.md",
    "chars": 1960,
    "preview": "# Types: RouterRoute\\<TRoute\\>\n\n```ts\ntype RouterRoute<TRoute> = object;\n```\n\n## Type Parameters\n\n| Type Parameter | Def"
  },
  {
    "path": "docs/api/types/RouterRouteName.md",
    "chars": 259,
    "preview": "# Types: RouterRouteName\\<TRouter\\>\n\n```ts\ntype RouterRouteName<TRouter> = TRouter extends Router<infer TRoutes> ? Route"
  },
  {
    "path": "docs/api/types/RouterRouteUnion.md",
    "chars": 483,
    "preview": "# Types: RouterRouteUnion\\<TRoutes\\>\n\n```ts\ntype RouterRouteUnion<TRoutes> = { [K in keyof TRoutes]: TRoutes[K][\"name\"] "
  },
  {
    "path": "docs/api/types/RouterRoutes.md",
    "chars": 228,
    "preview": "# Types: RouterRoutes\\<TRouter\\>\n\n```ts\ntype RouterRoutes<TRouter> = TRouter extends Router<infer TRoutes> ? TRoutes : R"
  },
  {
    "path": "docs/api/types/RouterViewPropsGetter.md",
    "chars": 716,
    "preview": "# Types: RouterViewPropsGetter()\\<TOptions\\>\n\n```ts\ntype RouterViewPropsGetter<TOptions> = (route, context) => MaybeProm"
  },
  {
    "path": "docs/api/types/Routes.md",
    "chars": 176,
    "preview": "# Types: Routes\n\n```ts\ntype Routes = readonly Route[];\n```\n\nRepresents an immutable array of Route instances. Return val"
  },
  {
    "path": "docs/api/types/ToCallback.md",
    "chars": 431,
    "preview": "# Types: ToCallback()\\<TRouter\\>\n\n```ts\ntype ToCallback<TRouter> = (resolve) => \n  | ResolvedRoute\n  | UrlString\n  | und"
  },
  {
    "path": "docs/api/types/ToRoute.md",
    "chars": 1058,
    "preview": "# Types: ToRoute\\<TOptions, TProps\\>\n\n```ts\ntype ToRoute<TOptions, TProps> = CreateRouteOptions extends TOptions ? Route"
  },
  {
    "path": "docs/api/types/ToUrl.md",
    "chars": 359,
    "preview": "# Types: ToUrl\\<TOptions\\>\n\n```ts\ntype ToUrl<TOptions> = Url<Identity<ToUrlPart<TOptions[\"host\"]>[\"params\"] & ToUrlPart<"
  },
  {
    "path": "docs/api/types/Url.md",
    "chars": 2412,
    "preview": "# Types: Url\\<TParams\\>\n\n```ts\ntype Url<TParams> = object;\n```\n\nRepresents the structure of a url parts. Can be used to "
  },
  {
    "path": "docs/api/types/UrlParamsReading.md",
    "chars": 520,
    "preview": "# Types: UrlParamsReading\\<TUrl\\>\n\n```ts\ntype UrlParamsReading<TUrl> = ToUrlParamsReading<TUrl[\"params\"]>;\n```\n\nExtracts"
  },
  {
    "path": "docs/api/types/UrlParamsWriting.md",
    "chars": 623,
    "preview": "# Types: UrlParamsWriting\\<TUrl\\>\n\n```ts\ntype UrlParamsWriting<TUrl> = ToUrlParamsWriting<TUrl[\"params\"]>;\n```\n\nExtracts"
  },
  {
    "path": "docs/api/types/UrlString.md",
    "chars": 104,
    "preview": "# Types: UrlString\n\n```ts\ntype UrlString = `http://${string}` | `https://${string}` | `/${string}`;\n```\n"
  },
  {
    "path": "docs/api/types/UseLink.md",
    "chars": 1594,
    "preview": "# Types: UseLink\n\n```ts\ntype UseLink = object;\n```\n\n## Properties\n\n| Property | Type | Description |\n| ------ | ------ |"
  },
  {
    "path": "docs/api/types/UseLinkOptions.md",
    "chars": 167,
    "preview": "# Types: UseLinkOptions\n\n```ts\ntype UseLinkOptions = RouterPushOptions & object;\n```\n\n## Type Declaration\n\n### prefetch?"
  },
  {
    "path": "docs/api/types/WithHost.md",
    "chars": 350,
    "preview": "# Types: WithHost\\<THost\\>\n\n```ts\ntype WithHost<THost> = object;\n```\n\n## Type Parameters\n\n| Type Parameter | Default typ"
  },
  {
    "path": "docs/api/types/WithParent.md",
    "chars": 319,
    "preview": "# Types: WithParent\\<TParent\\>\n\n```ts\ntype WithParent<TParent> = object;\n```\n\n## Type Parameters\n\n| Type Parameter | Def"
  },
  {
    "path": "docs/api/types/WithoutHost.md",
    "chars": 155,
    "preview": "# Types: WithoutHost\n\n```ts\ntype WithoutHost = object;\n```\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n| <a "
  },
  {
    "path": "docs/api/types/WithoutParent.md",
    "chars": 163,
    "preview": "# Types: WithoutParent\n\n```ts\ntype WithoutParent = object;\n```\n\n## Properties\n\n| Property | Type |\n| ------ | ------ |\n|"
  },
  {
    "path": "docs/api/variables/IS_URL_SYMBOL.md",
    "chars": 76,
    "preview": "# Variables: IS\\_URL\\_SYMBOL\n\n```ts\nconst IS_URL_SYMBOL: unique symbol;\n```\n"
  },
  {
    "path": "docs/components/router-link.md",
    "chars": 3323,
    "preview": "# RouterLink\n\nThe router link component is a wrapper around the anchor element. It is registered globally by the [router"
  },
  {
    "path": "docs/components/router-view.md",
    "chars": 1801,
    "preview": "# RouterView\n\nThe router view component is how route components are rendered. It is registered globally by the [router p"
  },
  {
    "path": "docs/composables/useLink.md",
    "chars": 467,
    "preview": "# useLink\n\nUsed to create a link to a route. Generally the [`RouterLink`](/components/router-link) component should be u"
  },
  {
    "path": "docs/composables/useQueryValue.md",
    "chars": 1751,
    "preview": "# useQueryValue\n\nReturns the value of a specific key in the query string. The query can be accessed using the Router Rou"
  },
  {
    "path": "docs/composables/useRoute.md",
    "chars": 934,
    "preview": "# useRoute\n\nReturns the current route. See ['RouterRoute'](/api/types/RouterRoute) for more information.\n\n```ts\nimport {"
  },
  {
    "path": "docs/composables/useRouter.md",
    "chars": 308,
    "preview": "# useRouter\n\nReturns the installed router instance. See ['Router'](/api/types/Router) for more information.\n\n```ts\nimpor"
  },
  {
    "path": "docs/core-concepts/component-props.md",
    "chars": 4154,
    "preview": "# Component Props\n\nWith Kitbag Router, you can define a `props` callback on your route. Your callback is given the [`Res"
  },
  {
    "path": "docs/core-concepts/external-routes.md",
    "chars": 1052,
    "preview": "# External Routes\n\nExternal routes allow you to define routes for things outside of your application. External routes ha"
  },
  {
    "path": "docs/core-concepts/navigation.md",
    "chars": 4143,
    "preview": "# Navigation\n\nWe'll use these example routes to demonstrate navigation:\n\n```ts\nconst blog = createRoute({\n  name: 'blog'"
  },
  {
    "path": "docs/core-concepts/params.md",
    "chars": 9543,
    "preview": "# Params\n\nParams are used to define the dynamic parts of a route. Params can be used in the `path`, `query`, `hash`, and"
  },
  {
    "path": "docs/core-concepts/router-route.md",
    "chars": 4484,
    "preview": "# Router Route\n\nThe current route is represented by the [RouterRoute](/api/types/RouterRoute.md).\n\nThis current route is"
  },
  {
    "path": "docs/core-concepts/router.md",
    "chars": 3965,
    "preview": "# Router\n\nThe router is responsible for matching routes to urls and updating the browser history. It also provides a way"
  },
  {
    "path": "docs/core-concepts/routes.md",
    "chars": 7765,
    "preview": "# Routes\n\nRoutes are used to define the structure of your application and to provide a way to navigate between different"
  },
  {
    "path": "docs/index.md",
    "chars": 1008,
    "preview": "---\n# https://vitepress.dev/reference/default-theme-home-page\nlayout: home\n\nhero:\n  name: \"Kitbag Router\"\n  text: \"Type "
  },
  {
    "path": "docs/introduction.md",
    "chars": 2403,
    "preview": "# Introduction\n\nKitbag Router introduces a fresh, developer-centric approach to routing in Vue.js applications.\n\nAt the "
  },
  {
    "path": "docs/migrating-vue-router.md",
    "chars": 3889,
    "preview": "# Migrating from vue-router\n\n:white_check_mark: Nested routes mapping  \n:white_check_mark: Dynamic Routing  \n:white_chec"
  },
  {
    "path": "docs/quick-start.md",
    "chars": 2685,
    "preview": "# Quick Start\n\n## Installation\n\nInstall Kitbag Router with your favorite package manager\n\n```bash\n# bun\nbun add @kitbag/"
  },
  {
    "path": "eslint.config.js",
    "chars": 438,
    "preview": "import config from '@kitbag/eslint-config'\n\n/** @type {import('eslint').Linter.Config[]} */\nexport default [\n  ...config"
  },
  {
    "path": "package.json",
    "chars": 1878,
    "preview": "{\n  \"name\": \"@kitbag/router\",\n  \"private\": false,\n  \"version\": \"0.24.1\",\n  \"license\": \"MIT\",\n  \"bugs\": {\n    \"url\": \"htt"
  },
  {
    "path": "scripts/api.js",
    "chars": 3851,
    "preview": "import path from 'path'\nimport fs from 'fs/promises'\n\nasync function renameTypeAliasesFolderToTypes() {\n  try {\n    cons"
  },
  {
    "path": "src/components/echo.ts",
    "chars": 196,
    "preview": "import { defineComponent } from 'vue'\n\nexport default defineComponent((props) => {\n  return () => props.value\n}, {\n  pro"
  },
  {
    "path": "src/components/helloWorld.ts",
    "chars": 138,
    "preview": "import { defineComponent } from 'vue'\n\nexport default defineComponent({\n  name: 'HelloWorld',\n  template: 'hello world',"
  },
  {
    "path": "src/components/rejection.ts",
    "chars": 222,
    "preview": "import { Component, defineComponent, h } from 'vue'\n\nexport function genericRejection(type: string): Component {\n  retur"
  },
  {
    "path": "src/components/routerLink.browser.spec.ts",
    "chars": 24822,
    "preview": "import { flushPromises, mount } from '@vue/test-utils'\nimport { describe, expect, test, vi } from 'vitest'\nimport { defi"
  },
  {
    "path": "src/components/routerLink.ts",
    "chars": 3870,
    "preview": "import { isUrlString, UrlString } from '@/types/urlString'\nimport { ResolvedRoute } from '@/types/resolved'\nimport { com"
  },
  {
    "path": "src/components/routerView.browser.spec.ts",
    "chars": 13346,
    "preview": "import { mount, flushPromises } from '@vue/test-utils'\nimport { expect, test } from 'vitest'\nimport { defineAsyncCompone"
  },
  {
    "path": "src/components/routerView.spec.ts",
    "chars": 710,
    "preview": "import { createSSRApp } from 'vue'\nimport { describe, it, expect } from 'vitest'\nimport { createRoute } from '@/services"
  },
  {
    "path": "src/components/routerView.ts",
    "chars": 3023,
    "preview": "import { createUseComponentsStore } from '@/compositions/useComponentsStore'\nimport { createUseRejection } from '@/compo"
  },
  {
    "path": "src/compositions/useComponentsStore.ts",
    "chars": 692,
    "preview": "import { inject, InjectionKey } from 'vue'\nimport { RouterNotInstalledError } from '@/errors/routerNotInstalledError'\nim"
  }
]

// ... and 217 more files (download for full content)

About this extraction

This page contains the full source code of the kitbagjs/router GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 417 files (785.7 KB), approximately 215.1k tokens, and a symbol index with 727 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!