History
A history is an interface to the navigation stack. The history serves as the source of truth for the current location, as well as provides a set of methods that may be used to change it.
It is similar to the DOM's window.history
object, but with a smaller, more
focused API.
interface History {
readonly action: Action;
readonly location: Location;
createHref(to: To): string;
createURL(to: To): URL;
go(delta: number): void;
listen(listener: Listener): () => void;
}