import { Effects, get } from '@typed/effects' import { HistoryEnv, Path } from './types' export function* replaceState(data: A, path: Path): Effects, A> { const { history } = yield* get>() history.replaceState(data, '', path) return data } export const replacePath = (path: Path) => replaceState(null, path)