In lib.dom.d.ts L13157 window.location is set as a read-only property but it can also be used to redirect a user by changing the value of it.
For example:
window.location = "/";
Error:
[ts] Cannot assign to 'location' because it is a constant or a read-only property.
PRs welcomed. You can find more information about contributing lib.d.ts fixes at https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md#contributing-libdts-fixes.
Workaround, or maybe what is actually supposed to be used is:
window.location.href = "http://www.google.com"
Most helpful comment
Workaround, or maybe what is actually supposed to be used is:
window.location.href = "http://www.google.com"