Replies: 2 comments 9 replies
-
https://x.lcas.dev/preact@10.5.11/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
-
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.ts
looks 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:Skypack resolves modules with type definitions using their
?dts
query paramter. If I reload the cache I can see the*.d.ts
files being fetched:Notably, the last file downloaded
https://cdn.skypack.dev/-/preact@v10.5.13-V3GjhSMJg71SAoQzY34u/dist=es2020,mode=types/src/jsx.d.ts
contains theJSX
namespace 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/manual@v1.8.1/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