mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
feat: export JSX types from jsx-runtime (#9501)
* feat: export JSX types from jsx-runtime * fix: i wont make the same mistakes three times * chore: changeset
This commit is contained in:
parent
4660aaa405
commit
eb36e95596
3 changed files with 16 additions and 3 deletions
5
.changeset/chilly-tips-breathe.md
Normal file
5
.changeset/chilly-tips-breathe.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'astro': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Export JSX namespace from `astro/jsx-runtime` for language tooling to consume
|
6
packages/astro/jsx-runtime.d.ts
vendored
Normal file
6
packages/astro/jsx-runtime.d.ts
vendored
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
// Q: Why this file?
|
||||||
|
// A: Our language tooling needs to access the JSX types from `astro/jsx-runtime`, due to TS limitations, however we
|
||||||
|
// can't import `astro-jsx` types inside the actual `jsx-runtime/index.js` file due to circular dependency issues.
|
||||||
|
import './astro-jsx.js';
|
||||||
|
export * from './dist/jsx-runtime/index.js';
|
||||||
|
export import JSX = astroHTML.JSX;
|
|
@ -34,12 +34,14 @@
|
||||||
"./env": "./env.d.ts",
|
"./env": "./env.d.ts",
|
||||||
"./types": "./types.d.ts",
|
"./types": "./types.d.ts",
|
||||||
"./client": "./client.d.ts",
|
"./client": "./client.d.ts",
|
||||||
"./import-meta": "./import-meta.d.ts",
|
|
||||||
"./astro-jsx": "./astro-jsx.d.ts",
|
"./astro-jsx": "./astro-jsx.d.ts",
|
||||||
"./tsconfigs/*.json": "./tsconfigs/*",
|
"./tsconfigs/*.json": "./tsconfigs/*",
|
||||||
"./tsconfigs/*": "./tsconfigs/*.json",
|
"./tsconfigs/*": "./tsconfigs/*.json",
|
||||||
"./jsx/*": "./dist/jsx/*",
|
"./jsx/*": "./dist/jsx/*",
|
||||||
"./jsx-runtime": "./dist/jsx-runtime/index.js",
|
"./jsx-runtime": {
|
||||||
|
"types": "./jsx-runtime.d.ts",
|
||||||
|
"default": "./dist/jsx-runtime/index.js"
|
||||||
|
},
|
||||||
"./compiler-runtime": "./dist/runtime/compiler/index.js",
|
"./compiler-runtime": "./dist/runtime/compiler/index.js",
|
||||||
"./runtime/*": "./dist/runtime/*",
|
"./runtime/*": "./dist/runtime/*",
|
||||||
"./config": {
|
"./config": {
|
||||||
|
@ -90,9 +92,9 @@
|
||||||
"zod.mjs",
|
"zod.mjs",
|
||||||
"env.d.ts",
|
"env.d.ts",
|
||||||
"client.d.ts",
|
"client.d.ts",
|
||||||
|
"jsx-runtime.d.ts",
|
||||||
"content-types.template.d.ts",
|
"content-types.template.d.ts",
|
||||||
"content-module.template.mjs",
|
"content-module.template.mjs",
|
||||||
"import-meta.d.ts",
|
|
||||||
"astro-jsx.d.ts",
|
"astro-jsx.d.ts",
|
||||||
"types.d.ts",
|
"types.d.ts",
|
||||||
"README.md",
|
"README.md",
|
||||||
|
|
Loading…
Reference in a new issue