import { pathJoin as joinPath } from '@typed/common' import { ArgsOf } from '@typed/lambda' import { isNewType, NewType } from '@typed/new-type' // Ignore to allow Phantom type for History State type // @ts-ignore export type HistoryEnv = { readonly location: Location readonly history: History } export type Path = NewType export const isPath = isNewType((str: string): str is Path => str.startsWith('/')) export const pathJoin = joinPath as (...args: ArgsOf) => Path