Skip to content

ui-router-mobx / RouteTypes

Interface: RouteTypes ​

Defined in: route-types.ts:29

Typed store fields, filled in by module augmentation. Empty, the store's current is a StateDeclaration and its params are RawParams, and nothing here emits JavaScript.

An app or a registry such as ui-router-registry fills it in. Its members:

  • snapshot: a route snapshot type whose current and params type the store's fields, and whose includes parameter types the targets RouterStore.includes takes beside a snapshots name.
  • snapshots: keyed by state name, the snapshot narrowed to that state's subtree. RouterStore.includes(name) narrows the store's current and params to it.
ts
declare module 'ui-router-mobx' {
  interface RouteTypes {
    snapshot: AppRouteSnapshot;
    snapshots: { 'contacts.contact': ContactSnapshot };
  }
}