UNPKG

@motorcycle/router

Version:

Standard Router Driver for Motorcycle.js

19 lines (18 loc) 806 B
import { DefineReturn, Location, Path, RouteDefinitions, RouterSource } from './'; import { Stream } from 'most'; export declare function history(routerSource: RouterSource): Stream<Location>; export declare const path: PathFn; export interface PathFn { (path: Path, routerSource: RouterSource): RouterSource; (path: Path): (routerSource: RouterSource) => RouterSource; } export declare const define: DefineFn; export interface DefineFn { (routes: RouteDefinitions, routerSource: RouterSource): Stream<DefineReturn>; (router: RouteDefinitions): (routerSource: RouterSource) => Stream<DefineReturn>; } export declare const createHref: CreateHrefFn; export interface CreateHrefFn { (path: Path, routerSource: RouterSource): Path; (path: Path): (routerSource: RouterSource) => Path; }