Route #

The route the app currently shows. A documentation site only needs a lookup from a path to a page, so the route is plain data: no matcher, no params, no nested records.

Fields #

pathstring

Public route path without the site base, for example /guide/intro.

fullPathstring

path plus query and hash, for example /guide/intro?from=nav#top.

queryReadonly<Record<string, string | string[]>>

Parsed query, URLSearchParams style: a repeated key becomes an array.

hashstring

Hash including the leading #, or an empty string.

foundboolean

Whether the page table has a page for path.

Full type signature
TypeScript
interface Route {
  readonly path: string
  readonly fullPath: string
  readonly query: Readonly<Record<string, string | string[]>>
  readonly hash: string
  readonly found: boolean
}

Edit this page

Comments