withastro / astro

The web framework for content-driven websites. ⭐️ Star to support our work!
https://astro.build
Other
45.57k stars 2.39k forks source link

Type for TSX with solid integration #5017

Closed chlbri closed 1 year ago

chlbri commented 1 year ago

What version of astro are you using?

16.16.0

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

pnpm

What operating system are you using?

Mac

Describe the Bug

For tsx files for solidjs Components, I need to configure tsconfig in order to correct typescript check errors for JSX.IntrinsicElements.

{
  "extends": "astro/tsconfigs/strict",
  "compilerOptions": {
    "jsx": "react-jsx",
    "jsxImportSource": "solid-js"
  }
}

Link to Minimal Reproducible Example

https://stackblitz.com/github/chlbri/astro-site-solig-jsx-bug?file=tsconfig.json

Participation

matthewp commented 1 year ago

We have a PR due to go out next week that should fix this for new projects: https://github.com/withastro/astro/pull/4959

chlbri commented 1 year ago

Cool