deno and @types/react
In the docs it states that in order to use node packages that don't ship with type but have a
@types/...
declaration, I have to use the
// @deno-types="@types/..."
directive.
this is fine except when react
doesn't ship with types and I have to now include this directive in many many files and it also does not auto complete the import so I manually have to type the import in new files.
I guess I could use esm.sh
for this case but I don't know if it's a good idea to have npm:package
, https://esm.sh/...
, jsr:package
mixed in the deno.json imports.
TLDR:
- react does not have types so @deno-types="..."
is tedious in every file
- Should I use esm.sh
for this package instead or it's a bad idea?0 Replies