adt
adt
CDCloudflare Developers
Created by adt on 3/25/2025 in #workers-help
Type conflict in Astro SSR deployed App w/ Wrangler Types
I am trying to run an Astro SSR app w/ the Cloudflare adapter. When generating the wrangler types we get various global type def conflicts for our client side scripts. For example trying to call append on an HTMLElement. As per MDN, Element's append method "can append several nodes and strings, whereas Node.appendChild() can only append one node." When creating a custom element by extending HTMLElement in the client side script the TS compilation references the workers type definition of the HTMLElement which seems to mimic the Node append method. Am i missing something or is there a workaround?
1 replies