Type 'URL' is missing the following properties from type 'Url': auth, path, slashes, query

As you can see the error states Type ‘URL’ is missing some properties from type ‘url’

The expected type comes from the below code that I’ve imported from wherein I’ve declared another url property as shown below

How do I solve this error ?