# @askrjs/askr/router

> Published API exports for @askrjs/askr/router.

Source: [https://askrjs.com/docs/reference/api/askr/router](https://askrjs.com/docs/reference/api/askr/router)

Status: stable. Packages: @askrjs/askr/router.

**Published packages are authoritative.** Examples may lag behind a published contract. When guidance differs, verify the exports and TypeScript declarations in your installed package, then file an issue.

## Exports

This entrypoint publishes 88 exports from the declarations shipped by @askrjs/askr.

### `AccessDecision`

```ts
AccessDecision: AccessAllowDecision | AccessRedirectDecision | AccessDenyDecision
```

Outcome of a {@link RoutePolicy} evaluation: allow, redirect, or deny.

### `AccessDenyDecision`

```ts
AccessDenyDecision: any
```

Policy decision produced by {@link deny }/{@link unauthorized }/{@link forbidden }/{@link notFound }.

- `kind`: kind: 'deny';

- `status`: status: AccessDenyStatus;

### `AccessRedirectDecision`

```ts
AccessRedirectDecision: any
```

Policy decision produced by {@link redirect }: sends the visitor to another URL.

- `kind`: kind: 'redirect';

- `to`: to: string;

- `status`: status?: AccessRedirectStatus;

- `replace`: replace?: boolean;

### `allow`

```ts
allow: () => AccessAllowDecision
```

Policy decision: allow the route to render.

### `AuthContext`

```ts
AuthContext: any
```

Authentication state resolved for one request.

- `authenticated`: Whether a valid principal was resolved.

- `principal`: Resolved principal, or null for anonymous requests.

- `session`: Resolved session, or null when no session is active.

- `tenant`: Resolved tenant identifier, or null when unavailable.

- `scopes`: Optional scopes carried by the credential.

### `AuthRequirement`

```ts
AuthRequirement: (context: AuthContext<P, S>) => AuthDecision | PromiseLike<AuthDecision>
```

Predicate that allows or rejects an authentication context.

### `createRouteRegistry`

```ts
createRouteRegistry: (definition: RouteDefinition, options?: RouteRegistryOptions) => RouteRegistry
```

Run `definition` to declare routes (via `route`/`page`/`group`/`fallback`)
and build a {@link RouteRegistry} to pass to `createSPA`/`hydrateSPA`.

### `currentAuth`

```ts
currentAuth: () => AuthContext$1
```

Return the identity resolved for the route currently being rendered.

### `currentRoute`

```ts
currentRoute: <TParams extends RouteParams = RouteParams>() => RouteSnapshot<TParams>
```

Read the currently active route's {@link RouteSnapshot}; reactive during component render.

### `defer`

```ts
defer: <T>(promise: PromiseLike<T>) => Deferred<T>
```

Wrap a promise as a {@link Deferred} value that tracks its settled state and result.

### `Deferred`

```ts
Deferred: any
```

A promise-backed value that can be read synchronously once settled, produced by {@link defer}.

- `state`: readonly state: DeferredState;

- `value`: readonly value: T | undefined;

- `error`: readonly error: unknown;

- `promise`: readonly promise: Promise<T>;

### `DeferredState`

```ts
DeferredState: 'pending' | 'fulfilled' | 'rejected'
```

Lifecycle state of a {@link Deferred} value.

### `deny`

```ts
deny: (status: AccessDenyStatus) => AccessDenyDecision
```

Policy decision: deny the request with the given HTTP status.

### `fallback`

```ts
fallback: (Component: RouteComponent) => void
```

Declare the catch-all `/*` fallback route for the enclosing scope.

### `forbidden`

```ts
forbidden: () => AccessDenyDecision
```

Policy decision: deny with 403 Forbidden.

### `group`

```ts
group: (options: GroupHelperOptions, fn: RouteDefinition) => void
```

Declare a group of routes sharing `options` (auth, policies, layout, meta).

### `GroupHelperOptions`

```ts
GroupHelperOptions: any
```

Options accepted by the `group()` route-declaration helper.

- `layout`: layout?: (props: {
    children?: RenderableChild;
  }) => RenderableChild;

- `meta`: meta?: RouteMetaSource;

### `HistoryScrollBehavior`

```ts
HistoryScrollBehavior: 'restore' | 'top' | 'preserve'
```

Scroll behavior for browser back/forward (popstate) navigations.

### `index`

```ts
index: (Component: RouteComponent, options?: RouteOptions) => void
```

Declare the index route for the enclosing `page()` scope.

### `isDeferred`

```ts
isDeferred: <T = unknown>(value: unknown) => value is Deferred<T>
```

Check whether `value` is a {@link Deferred} produced by {@link defer}.

### `LayoutScopeRecord`

```ts
LayoutScopeRecord: any
```

Resolved layout component as stored in a route record's layout chain.

- `component`: component: (props: {
    children?: RenderableChild;
  }) => RenderableChild;

### `lazy`

```ts
lazy: <TComponent extends AnyRouteComponent>(factory: () => Promise<{ default: TComponent; } | TComponent>) => LazyRouteComponent<TComponent>
```

Wrap a dynamic-import factory as a {@link LazyRouteComponent}, loaded on first use.

### `LazyRouteComponent`

```ts
LazyRouteComponent: TComponent & {
  preload(): Promise<void>;
}
```

A route component loaded on demand via {@link lazy}, with an explicit `preload()`.

### `lazyRouteData`

```ts
lazyRouteData: <TModule, TData = TModule>(factory: () => PromiseLike<TModule>, select?: (module: TModule, context: RouteContext & { request?: Request; }) => TData | PromiseLike<TData>) => LazyRouteDataLoader<TModule, TData>
```

Create a cached route loader backed by a dynamic import. The module is only
requested when the owning route matches, unless preload() is called.

### `LazyRouteDataLoader`

```ts
LazyRouteDataLoader: ((context: RouteContext & {
  request?: Request;
}) => Promise<TData>) & {
  preload(): Promise<void>;
}
```

A route data loader loaded on demand via {@link lazyRouteData}, with an explicit `preload()`.

### `Link`

```ts
Link: ({ href: suppliedHref, to, class: className, children, rel, target, "aria-current": ariaCurrent, "aria-label": ariaLabel, onPress, onClick, ...rest }: LinkProps) => JSXElement
```

Link component that prevents default navigation and uses navigate()
Provides declarative way to navigate between routes

Accessibility features:
- Proper semantic <a> element (not a button)
- Supports aria-current for indicating active page
- Supports aria-label for descriptive labels
- Keyboard accessible (Enter key handled by native <a> element)

Respects native browser behaviors:
- Middle-click (opens in new tab)
- Ctrl/Cmd+click (opens in new tab)
- Shift+click (opens in new window)
- Alt+click (downloads link)
- Right-click context menu

Best practices:
- Use target="_blank" with rel="noopener noreferrer" for external links
- Use aria-current="page" for the current page in navigation
- Provide descriptive link text or aria-label
- For a styled link with automatic active-route state, install
  `@askrjs/themes` and use `NavLink` from `@askrjs/themes/components`

Uses applyInteractionPolicy to enforce pit-of-success principles:
- Interaction behavior centralized in foundations
- Keyboard handling automatic
- Composable via mergeProps

### `LinkProps`

```ts
LinkProps: LinkBaseProps & ({
  href: string;
  to?: never;
} | {
  href?: never;
  to: RouteDestination;
})
```

Props for {@link Link}: either a raw `href` or a typed route `to` destination.

- `aria-current`: Optional aria-current attribute for indicating current page/location.
Use "page" for the current page in navigation.

- `aria-label`: Optional aria-label for accessibility when link text isn't descriptive enough.

- `children`: children?: RenderableChild;

- `class`: class?: string | undefined;

- `href`: href?: string | undefined;

- `onClick`: onClick?: ((event: MouseEvent) => void) | undefined;

- `onPress`: onPress?: ((event: Event) => void) | undefined;

- `rel`: Optional rel attribute for link relationships.
Common values: "noopener", "noreferrer", "nofollow"

- `target`: Optional target attribute.
Use "_blank" for new tab/window.

- `to`: to?: RouteDestination | undefined;

### `navigate`

```ts
navigate: (path: string, options?: NavigateOptions) => void
```

Navigate the client-side router to `path` using the History API.

### `NavigateOptions`

```ts
NavigateOptions: {
  history?: 'push' | 'replace';
  replace?: boolean;
  scroll?: NavigationScrollBehavior;
}
```

Options for {@link navigate}.

### `NavigationScrollBehavior`

```ts
NavigationScrollBehavior: 'top' | 'preserve'
```

Scroll behavior for programmatic navigations (`navigate()`).

### `notFound`

```ts
notFound: () => AccessDenyDecision
```

Policy decision: deny with 404 Not Found.

### `onRouteChange`

```ts
onRouteChange: (fn: (current: RouteSnapshot, previous: RouteSnapshot | null) => RouteChangeCleanup, options?: RouteChangeOptions) => void
```

Register a callback to run whenever the active route changes, with optional cleanup.

### `Outlet`

```ts
Outlet: () => JSXElement
```

Renders the nested route content for the enclosing layout or page scope.

### `page`

```ts
page: { <const TPath extends string>(path: TPath, Component: RouteComponent<RoutePathParams<TPath>>, fn: RouteDefinition): void; <const TPath extends string, TComponent extends AnyRouteComponent>(path: TPath, Component: CompatibleRouteComponent<TPath, TComponent>, fn: RouteDefinition): void; <const TPath extends string>(path: TPath, Component: RouteComponent<RoutePathParams<TPath>>, options: PageHelperOptions, fn: RouteDefinition): void; <const TPath extends string, TComponent extends AnyRouteComponent>(path: TPath, Component: CompatibleRouteComponent<TPath, TComponent>, options: PageHelperOptions, fn: RouteDefinition): void; }
```

Declare a route page at `path`, nesting a sub-scope for `index`/`page`/`fallback`
declarations and options like `preload`/`meta`/`auth`.

### `PageHelperOptions`

```ts
PageHelperOptions: any
```

Options accepted by the `page()` route-declaration helper.

- `preload`: preload?: (context: RouteContext & {
    request?: Request;
    data: QueryPrefetchContext;
  }) => unknown;

- `meta`: meta?: RouteMetaSource;

### `PageScopeRecord`

```ts
PageScopeRecord: any
```

Resolved page host component as stored in a route record's page chain.

- `component`: component: RouteComponent;

### `ParsedSegment`

```ts
ParsedSegment: any
```

A single parsed segment from a route path.

- `static`:   a literal path segment, e.g. `"users"` in `/users/{id}`
- `param`:    a `{name}` capture group — `value` holds the param name
- `wildcard`: a bare `*` segment that captures exactly one segment
- `splat`:    a `{*name}` capture group that captures the remaining path
- `catchall`: the `/*` catch-all that matches any depth

- `kind`: kind: 'static' | 'param' | 'wildcard' | 'splat' | 'catchall';

- `value`: For static/wildcard/catchall: the literal text; for param: the param name.

### `reconcileRouteMeta`

```ts
reconcileRouteMeta: (meta: Readonly<RouteMeta>, target?: Document) => void
```

Replace only Askr-owned head nodes after a successful client navigation.

### `redirect`

```ts
redirect: (to: string, init?: { status?: AccessRedirectStatus; replace?: boolean; }) => AccessRedirectDecision
```

Policy decision: redirect the visitor to `to`.

### `Resolve`

```ts
Resolve: <T>(props: ResolveProps<T>) => JSXElement
```

Render a {@link Deferred} value's fulfilled state, a pending placeholder, or a rejected fallback.

### `resolveDeferredValues`

```ts
resolveDeferredValues: <T>(input: T, signal?: AbortSignal) => Promise<T>
```

Recursively await any {@link Deferred} values nested within `input`, returning it once fully resolved.

### `ResolveProps`

```ts
ResolveProps: any
```

Props for {@link Resolve}.

- `children`: children: (value: T) => RenderableChild;

- `pending`: pending?: RenderableChild;

- `rejected`: rejected?: RenderableChild | ((error: unknown) => RenderableChild);

- `value`: value: Deferred<T>;

### `resolveRouteMeta`

```ts
resolveRouteMeta: (record: RouteRecord, context: RouteContext) => Promise<Readonly<RouteMeta>>
```

Resolve a route's merged {@link RouteMeta} by running its metadata chain against `context`.

### `resolveRouteRequest`

```ts
resolveRouteRequest: (target: string, options: RouteRequestOptions) => RouteRequestResult | Promise<RouteRequestResult>
```

Resolve `target` against a route registry, applying auth/policies to produce a render/redirect/deny result.

### `route`

```ts
route: { <const TPath extends string, const TSearchSchema extends ObjectSchema<RouteSearch> | undefined = undefined, TLoaderData = unknown, TDehydratedData = TLoaderData>(path: TPath, Component: RouteComponent<RoutePathParams<TPath>>, options?: RouteOptions<RoutePathParams<TPath>, TSearchSchema, TLoaderData, TDehydratedData>): RouteRef<RoutePathParams<TPath>, RouteRefSearch<TSearchSchema>>; <const TPath extends string, TComponent extends AnyRouteComponent, const TSearchSchema extends ObjectSchema<RouteSearch> | undefined = undefined, TLoaderData = unknown, TDehydratedData = TLoaderData>(path: TPath, Component: CompatibleRouteComponent<TPath, TComponent>, options?: RouteOptionsForComponent<TPath, TComponent, TSearchSchema, TLoaderData, TDehydratedData>): RouteRef<RoutePathParams<TPath>, RouteRefSearch<TSearchSchema>>; }
```

Declare a route at `path` rendering `Component`, returning a typed {@link RouteRef} for building destinations.

### `Route`

```ts
Route: any
```

A single path-to-handler binding as seen by low-level navigation code.

- `path`: path: string;

- `handler`: handler: RouteHandler<TParams>;

- `namespace`: namespace?: string;

### `RouteAuthOptions`

```ts
RouteAuthOptions: any
```

Auth configuration shared across a route registry or a single route.

- `resolve`: resolve: RouteAuthResolver;

- `loginPath`: loginPath?: string | ((context: RouteContext) => string | PromiseLike<string>);

- `authenticatedRedirectTo`: authenticatedRedirectTo?: string | ((context: RouteContext) => string | PromiseLike<string>);

### `RouteAuthResolver`

```ts
RouteAuthResolver: (context: Omit<RouteContext, 'auth'>) => AuthContext | PromiseLike<AuthContext>
```

Resolves the {@link AuthContext} for a route request.

### `RouteChangeCleanup`

```ts
RouteChangeCleanup: void | (() => void)
```

Optional cleanup returned by an {@link onRouteChange} callback, run before the next change.

### `RouteChangeOptions`

```ts
RouteChangeOptions: any
```

Options for {@link onRouteChange}.

- `immediate`: immediate?: boolean;

### `RouteComponent`

```ts
RouteComponent: (props: TParams) => RenderableChild
```

A route page component: a regular component that receives route params as
props derived from the URL pattern.

Components may accept no params at all — zero-argument components are still
assignable.

### `RouteContext`

```ts
RouteContext: any
```

Context passed to route policies, auth resolvers, and loaders.

- `mode`: mode: RouteMode;

- `params`: params: TParams;

- `pathname`: pathname: string;

- `search`: search: string;

- `hash`: hash: string;

- `href`: href: string;

- `auth`: auth: AuthContext;

- `signal`: signal: AbortSignal;

### `routeData`

```ts
routeData: <T>() => T
```

Read the current route's server loader data during render or hydration.

### `RouteDataLoadError`

```ts
RouteDataLoadError: typeof RouteDataLoadError
```

Thrown when a route's `loader` rejects; wraps the original `cause`.

- `route`: readonly route: string;

- `phase`: readonly phase: RouteDataLoadPhase;

- `cause`: readonly cause: unknown;

### `RouteDataLoadPhase`

```ts
RouteDataLoadPhase: 'client' | 'server' | 'ssg'
```

Which environment a route's data loader ran (or failed) in.

### `RouteDefinition`

```ts
RouteDefinition: () => void
```

A callback that declares routes via `route()`/`page()`/`group()`, passed to {@link createRouteRegistry }.

### `RouteDestination`

```ts
RouteDestination: any
```

A resolved navigation target with a computed `href`, produced by {@link to }.

- `href`: readonly href: string;

### `RouteHandler`

```ts
RouteHandler: any
```

A function rendering a matched route's page content, with layouts already composed.

### `RouteManifest`

```ts
RouteManifest: any
```

The normalized route manifest produced by registered route definitions.
declarations.  Pass it to `createSPA`, `hydrateSPA`, or `renderToString`
instead of assembling plain `Route[]` arrays.

```ts
import { createRouteRegistry } from '@askrjs/askr/router';
const registry = createRouteRegistry(() => { ... });
await createSPA({ root: '#app', registry });
```

- `records`: records: RouteRecord[];

- `auth`: auth?: RouteAuthOptions;

- `basePath`: Normalized public pathname prefix. Empty and root mounts omit it.

### `RouteMatch`

```ts
RouteMatch: any
```

A single matched route, as reported by {@link currentRoute } and activity predicates.

- `path`: path: string;

- `params`: params: Readonly<TParams>;

- `name`: name?: string;

- `namespace`: namespace?: string;

### `RouteMeta`

```ts
RouteMeta: any
```

- `title`: title?: string;

- `description`: description?: string;

- `canonical`: canonical?: string;

- `robots`: robots?: string;

- `openGraph`: openGraph?: Record<string, string>;

- `links`: links?: readonly {
    rel: string;
    href: string;
    [key: string]: string;
  }[];

- `jsonLd`: jsonLd?: unknown | readonly unknown[];

- `html`: html?: {
    lang?: string;
    dir?: 'ltr' | 'rtl' | 'auto';
  };

### `RouteMetaSource`

```ts
RouteMetaSource: RouteMeta | ((context: RouteContext<TParams>) => RouteMeta | PromiseLike<RouteMeta>)
```

A route's metadata, or a function computing it from the resolved context.

### `RouteMode`

```ts
RouteMode: 'spa' | 'ssr' | 'ssg'
```

The rendering mode a route is currently being evaluated under.

### `RouteOptions`

```ts
RouteOptions: any
```

Options for `route()` declarations.

- `loader`: server data loader called before render, result passed as SSR data
- `entries`: SSG entry generator — returns one param map per static page
- `title`: page title hint used by SSG and document-meta integrations
- `namespace`: MFE namespace key for grouped route management

- `loader`: loader?: (context: RouteContext<TParams> & {
    request?: Request;
  }) => TLoaderData | PromiseLike<TLoaderData>;

- `dehydrate`: Select the loader data transported to the browser for initial hydration.

Server rendering still receives the complete loader value. The selector
must be synchronous; client navigations rerun the loader and receive its
complete result.

- `preload`: preload?: (context: RouteContext<TParams> & {
    request?: Request;
    data: QueryPrefetchContext;
  }) => unknown;

- `entries`: entries?: () => Array<TParams> | Promise<Array<TParams>>;

- `invalidationKeys`: Optional invalidation keys used by incremental SSG generation.

- `title`: title?: string;

- `namespace`: namespace?: string;

- `search`: search?: TSearchSchema;

- `meta`: meta?: RouteMetaSource<TParams>;

- `actions`: actions?: readonly ActionDescriptor[];

### `RouteParams`

```ts
RouteParams: Record<string, string>
```

Path parameters captured for a matched route, keyed by parameter name.

### `RoutePathParams`

```ts
RoutePathParams: [ExtractRoutePathParamNames<Path>] extends [never] ? Record<never, string> : { [Key in ExtractRoutePathParamNames<Path>]: string; }
```

Statically infers the param record shape from a route path string literal, e.g. `/posts/{id}`.

### `RoutePolicy`

```ts
RoutePolicy: (context: RouteContext) => AccessDecision | PromiseLike<AccessDecision>
```

A route access-control check, evaluated against {@link RouteContext} to produce an {@link AccessDecision}.

### `RouteQuery`

```ts
RouteQuery: any
```

Read-only accessor for the current route's query-string parameters.

- `get`: get(key: string): string | null;

- `getAll`: getAll(key: string): string[];

- `has`: has(key: string): boolean;

- `toJSON`: toJSON(): Record<string, string | string[]>;

### `RouteQueryParamInput`

```ts
RouteQueryParamInput: RouteQueryParamValue | readonly RouteQueryParamValue[]
```

A query-string value, or an array of them for a repeated param.

### `RouteQueryParamValue`

```ts
RouteQueryParamValue: string | number | boolean | null | undefined
```

A single query-string value accepted by {@link updateRouteQuery}.

### `RouteQueryUpdater`

```ts
RouteQueryUpdater: (searchParams: URLSearchParams) => void
```

A function that mutates a `URLSearchParams` directly, for {@link updateRouteQuery}.

### `RouteQueryUpdates`

```ts
RouteQueryUpdates: Record<string, RouteQueryParamInput>
```

A map of query param updates for {@link updateRouteQuery}; `null`/`undefined` removes the key.

### `RouteRecord`

```ts
RouteRecord: any
```

A fully normalized route record produced by `route(path, Component, options?)`.

This is the canonical representation shared by:
  - SPA matching and navigation
  - SSR request resolution
  - SSG manifest expansion

- `path`: Canonical normalized absolute path, e.g. `/posts/{slug}`

- `component`: The page component to render when this route is active

- `segments`: Pre-parsed segment list for fast matching and typed param extraction

- `rank`: Pre-computed specificity rank (higher = more specific)

- `layoutChain`: Layout chain from outermost to innermost, applied automatically on render

- `pageChain`: Page chain from outermost to innermost, composed through Outlet before layouts apply

- `options`: Route metadata: loader, entries, policies, title, namespace

- `metaChain`: Metadata sources ordered from outermost group/page to the route leaf.

- `isFallback`: True when this is the `/*` catch-all fallback route

- `handler`: Runtime-ready handler with layout composition baked in.
Compatible with the low-level `RouteHandler` signature so that navigation
and SSR rendering do not need to know about layout chains.

### `RouteRef`

```ts
RouteRef: any
```

Stable, typed reference to a route returned by `route()`, used to build destinations.

- `path`: readonly path: string;

- `searchSchema`: readonly searchSchema?: ObjectSchema<TSearch & RouteSearch>;

- `basePath`: readonly basePath?: string;

- `__params`: readonly __params?: TParams;

- `__search`: readonly __search?: TSearch;

### `RouteRegistry`

```ts
RouteRegistry: any
```

Opaque handle produced by {@link createRouteRegistry }, required by `createSPA`/`hydrateSPA`.

- `manifest`: manifest: RouteManifest;

- `routes`: routes: readonly Route[];

### `RouteRegistryOptions`

```ts
RouteRegistryOptions: any
```

Options for {@link createRouteRegistry }.

- `auth`: auth?: RouteAuthOptions;

- `basePath`: Public pathname prefix for applications mounted below the origin root.

### `RouteRenderResult`

```ts
RouteRenderResult: any
```

A resolved route request that should render `handler` with `params`.

- `kind`: kind: 'render';

- `handler`: handler: RouteHandler<TParams>;

- `params`: params: TParams;

- `record`: record?: RouteRecord;

### `RouteRequestOptions`

```ts
RouteRequestOptions: any
```

Options for resolving a route request (used internally by `createSPA`/`hydrateSPA`/SSR).

- `registry`: Explicit route source shared by the application renderers.

- `mode`: mode?: RouteMode;

- `load`: load?: boolean;

- `auth`: auth?: RouteAuthOptions;

- `authContext`: authContext?: AuthContext;

- `signal`: signal?: AbortSignal;

- `request`: request?: Request;

- `telemetry`: telemetry?: CoreTelemetry;

### `RouteRequestResult`

```ts
RouteRequestResult: RouteRenderResult<TParams> | AccessRedirectDecision | AccessDenyDecision | null
```

Outcome of resolving a route request: render, redirect, deny, or no match.

### `RouteSearch`

```ts
RouteSearch: Record<string, RouteSearchValue>
```

A route's query-string parameters, keyed by name.

### `RouteSearchValue`

```ts
RouteSearchValue: string | number | boolean | null | undefined | readonly (string | number | boolean | null)[]
```

A stable, typed reference returned by route() for destination construction.

### `RouteSnapshot`

```ts
RouteSnapshot: any
```

Full description of the currently active route, returned by {@link currentRoute }.

- `path`: path: string;

- `params`: params: Readonly<TParams>;

- `query`: query: Readonly<RouteQuery>;

- `hash`: hash: string | null;

- `name`: name?: string;

- `namespace`: namespace?: string;

- `matches`: matches: readonly RouteMatch<TParams>[];

### `ScrollRestorationOptions`

```ts
ScrollRestorationOptions: {
  navigation?: NavigationScrollBehavior;
  history?: HistoryScrollBehavior;
}
```

Options for {@link configureScrollRestoration }.

### `serializeRouteMeta`

```ts
serializeRouteMeta: (meta: RouteMeta) => string
```

Render a {@link RouteMeta} to the `<title>`/`<meta>`/`<link>`/JSON-LD markup for the document `<head>`.

### `to`

```ts
to$1: <TParams extends RouteParams, TSearch extends RouteSearch = RouteSearch>(route: RouteRef<TParams, TSearch>, params: TParams, search?: TSearch) => RouteDestination
```

Build a {@link RouteDestination} (with a computed `href`) for a {@link RouteRef} and params/search.

### `unauthorized`

```ts
unauthorized: () => AccessDenyDecision
```

Policy decision: deny with 401 Unauthorized.

### `updateRouteQuery`

```ts
updateRouteQuery: (updates: RouteQueryUpdates | RouteQueryUpdater, options?: UpdateRouteQueryOptions) => void
```

### `UpdateRouteQueryOptions`

```ts
UpdateRouteQueryOptions: {
  /**
   * Defaults to replace so high-frequency controls such as search inputs do not
   * create one browser-history entry per character.
   */
  history?: 'push' | 'replace';
  replace?: boolean;
}
```

Options for {@link updateRouteQuery}.

## Documentation navigation

[Previous](https://askrjs.com/docs/reference/api/askr/fx/index.md) | [Next](https://askrjs.com/docs/reference/api/askr/actions/index.md)
