export interface UrlParamTransform < T > { fromParam : ( x : string ) => T ; toParam : ( x : T ) => string ; } const identity = ( x ) => x ; export const stringParamTransform = { fromParam : identity , toParam : identity } ; export const intParamTransform = { fromParam : x => parseInt ( x , 10 ) , toParam : x => x . toString ( ) } ;