Redirect to another page

JavaScript version
const goTo = (url) => (location.href = url);
TypeScript version
const goTo = (url: string): string => (location.href = url);