import { IComputedValue } from 'mobx/dist/internal' export enum FalsyValue { 'EmptyString', 'False', 'NaN', 'Null', 'Undefined', 'Zero', } export type FormatFunction = (it: T | null | undefined) => string export type IRouteSetter = (url: string) => void export type ComputedRouteOptions = { patterns: string[] parse?: (it: string) => T format?: FormatFunction defaultValue?: T keepAlive?: boolean } export type SetRouteParamOptions = { enforce?: boolean enforcePattern?: string | undefined | null | false cleanParams?: boolean | ComputedRouteParam[] falsyValuesAllowed?: FalsyValue[] } export type ComputedRouteParam = IComputedValue & { push: RouteParamSetter replace: RouteParamSetter __name: string } type RouteParamSetter = (newValue: T | null | undefined, options?: SetRouteParamOptions) => Promise | void export type TypeComputedRouteOptions = Omit, 'format' | 'parse'>