/** * History state interface. This value can be extended via the standard * typescript declaration merging mechanism. * * Use it via {@link getHistoryState}. * * @see https://www.typescriptlang.org/docs/handbook/declaration-merging.html */ export interface HistoryState { emailValue?: string; } /** * Get's window history state with correct typings. * * Note that this is not a reactive value. It will not trigger re-renders if * it is changed. */ export function getHistoryState() { return window.history.state as HistoryState | null; }