deno-rc: JSX in VSCode
I've jumped up to the deno rc (2.0.0-rc.5) which nicely solves a gnarli NPM import error.
I'm in a mono-repo deno "workspace", with a deno.json at the root contining:
"compilerOptions": {
"strict": true,
"lib": ["dom", "dom.iterable", "dom.asynciterable", "deno.ns"],
"jsx": "react",
"jsxFactory": "React.createElement",
"jsxFragmentFactory": "React.Fragment"
},
and in a sub-folder, a module that contains the module level deno.json (name/version) with some JSX within .tsx files.
The app runs, but the VSCode editor is not recognizing the angle-brackets, throwing underline errors in the IDE.
I'm wondering, is it reaonable to assume this is "release candidate" friction?
OR is what I've described obviously wrong, for getting the JSX.IntrinsicElements to register?
Thanks!
5 Replies
(NOTE: this earlier message deleted from #general from yesterday, as it look like #help is the more appropriate channel). :deno_thankyou:
CC @nayeemrmn
This might be related to React not publishing types in their package. They are in
@types/react
.@Phil Yeah, if you have an import to
react
, add // @deno-types="@types/react"
above it.Ah, thanks @nayeemrmn
I Have globalised that within my root
deno.json
file with with the jsxImportSourceTypes
entry:
Appreciate everyone's help! 🙇