[🐞] Partytown React component doesn't allow Readonly<URL> as input #642
Open
Description
Describe the bug
I get Typescript error when I define the function passed into resolveUrl
with Readonly<URL>
.
Type '(url: Readonly<URL>) => Readonly<URL>' is not assignable to type '(url: URL, location: Location, type: ResolveUrlType) => URL | null | undefined'.
Type 'Readonly<URL>' is not assignable to type 'URL'.
Type 'Readonly<URL>' provides no match for the signature 'new (url: string | URL, base?: string | URL | undefined): URL'.
Reproduction
Steps to reproduce
- Add
@builder.io/party
into project - Use
Partytown
React component - Pass into
resolveUrl
function that hasurl: Readonly<URL>
- Observe Typescript failure
Browser Info
Compile time
Additional Information
No response