[]previous and next page

Register

Augmentable registry.

Augmentable registry. Declare your route paths once and every typed API (A to, navigate, useParams({ from }), useSearch({ from })) accepts only those paths:

Import#

ts
import type { Register } from "@shadow-js/router";

Signature#

ts
interface Register {}

Examples#

ts
declare module "@shadow-js/router" {
  interface Register {
    paths: "/" | "/posts/:id";
  }
}