import { DefineReturn , Location , Path , RouteDefinitions , RouterSource } from './' ; import { Stream } from 'most' ; import { curry2 } from '@most/prelude' ; export function history ( routerSource ) { return routerSource . history ( ) ; } export const path = curry2 ( function path ( route , routerSource ) : RouterSource { return routerSource . path ( route ) ; } ) ; export interface PathFn { ( path , routerSource ) : RouterSource ; ( path ) : ( routerSource : RouterSource ) => RouterSource ; } export const define = curry2 ( function define ( routes , routerSource ) : Stream < DefineReturn > { return routerSource . define ( routes ) ; } ) ; export interface DefineFn { ( routes , routerSource ) : Stream < DefineReturn > ; ( router ) : ( routerSource : RouterSource ) => Stream < DefineReturn > ; } export const createHref = curry2 ( function createHref ( route , routerSource ) : Path { return routerSource . createHref ( route ) ; } ) ; export interface CreateHrefFn { ( path , routerSource ) : Path ; ( path ) : ( routerSource : RouterSource ) => Path ; }