Skip to content

Instantly share code, notes, and snippets.

@quisido
Created September 5, 2021 18:06
Show Gist options
  • Save quisido/7ee61f6b6176dd98138cdbc43580867a to your computer and use it in GitHub Desktop.
Save quisido/7ee61f6b6176dd98138cdbc43580867a to your computer and use it in GitHub Desktop.
ReadonlyHistory
import type { History, Location } from 'history';
type ReadonlyHistory<HistoryLocationState> = Omit<
Readonly<History<HistoryLocationState>>,
'location'
> & {
readonly location: Readonly<Location<HistoryLocationState>>;
};
export default ReadonlyHistory;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment