Open dong-lufei opened 1 year ago
I think this is more of an issue with the package typings than with Deno. I do not expect a type definition like that to work with Deno as-is. Usually the correct typings should be included or referenced in the types package, but the types needed here are huge so....
For the time being, enabling DOM typings might work. See: https://deno.land/manual@v1.30.0/advanced/typescript/configuration#targeting-deno-and-the-browser
linkedom's API is not the same as the browser's, and the type declerations are innacurate. See linkedom#167.
https://deno.land/manual@v1.30.0/advanced/jsx_dom/linkedom
Run according to the document code, it can run successfully. But it seems that the type is reported by deno-ts as wrong
const document: any Property 'document' does not exist on type 'Window & typeof globalThis'.deno-ts(2339)