Replies: 2 comments 9 replies
-
|
https://x.lcas.dev/[email protected]/mod.js uses different typings. The typings that are served by Skypack do not work in Deno (they rely on namespace augmentation). |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
FWIW, I opened an issue with Preact to see if we can get this resolved. |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have read through a couple of issues related to this, but not one that directly gives a solution.
I have a project where I was wanting to use Preact, my
deps.tslooks like this:As I was using Preact, which has a different jsx factory, I had to use a custom
tsconfig.json. It looks like this:{ "compilerOptions": { "lib": ["esnext", "dom", "deno.ns"], "jsx": "react", "jsxFactory": "h", "jsxFragmentFactory": "Fragment" } }Skypack resolves modules with type definitions using their
?dtsquery paramter. If I reload the cache I can see the*.d.tsfiles being fetched:Notably, the last file downloaded
https://cdn.skypack.dev/-/[email protected]/dist=es2020,mode=types/src/jsx.d.tscontains theJSXnamespace that I am having an issue with.Whenever I actually use jsx within the code:
I am returned an error about the JSX namespace:
The Deno docs (https://deno.land/[email protected]/typescript/types#type-declaration-semantics) aren't clear, outside of suggesting Skypack.
Is there a solution outside of hosting the module directly like @lucacasonato did for dext.ts?
Beta Was this translation helpful? Give feedback.
All reactions