How come typescript is complaining at window.location:
const url = new URL("/somepath", window.location);
Argument of type 'Location' is not assignable to parameter of type 'string | URL'. Type 'Location' is missing the following properties from type 'URL': password, searchParams, username, toJSONts(2345
but it's perfectly valid JS?
const url = new URL("/somepath", window.location)
console.log(url);
I get that window.location is missing password, searchParams, username, toJSON
but it seems like those are irrelevant in order to utilize URL?
Question:
Is this an issue with Typescript or is it a coincidence that URL accepts window.location-object