summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.changeset/olive-jeans-shout.md5
-rw-r--r--packages/astro/astro-jsx.d.ts10
-rw-r--r--packages/astro/config.d.ts2
-rw-r--r--packages/astro/env.d.ts2
-rw-r--r--packages/astro/package.json5
5 files changed, 16 insertions, 8 deletions
diff --git a/.changeset/olive-jeans-shout.md b/.changeset/olive-jeans-shout.md
new file mode 100644
index 000000000..423b11e00
--- /dev/null
+++ b/.changeset/olive-jeans-shout.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Fix types not working properly when using `moduleResolution: 'node16'`
diff --git a/packages/astro/astro-jsx.d.ts b/packages/astro/astro-jsx.d.ts
index 893b92b2f..aa7c0a573 100644
--- a/packages/astro/astro-jsx.d.ts
+++ b/packages/astro/astro-jsx.d.ts
@@ -23,12 +23,12 @@ declare namespace astroHTML.JSX {
children?: Children;
}
- type AstroBuiltinProps = import('./dist/@types/astro').AstroBuiltinProps;
- type AstroBuiltinAttributes = import('./dist/@types/astro').AstroBuiltinAttributes;
- type AstroDefineVarsAttribute = import('./dist/@types/astro').AstroDefineVarsAttribute;
- type AstroScriptAttributes = import('./dist/@types/astro').AstroScriptAttributes &
+ type AstroBuiltinProps = import('./dist/@types/astro.js').AstroBuiltinProps;
+ type AstroBuiltinAttributes = import('./dist/@types/astro.js').AstroBuiltinAttributes;
+ type AstroDefineVarsAttribute = import('./dist/@types/astro.js').AstroDefineVarsAttribute;
+ type AstroScriptAttributes = import('./dist/@types/astro.js').AstroScriptAttributes &
AstroDefineVarsAttribute;
- type AstroStyleAttributes = import('./dist/@types/astro').AstroStyleAttributes &
+ type AstroStyleAttributes = import('./dist/@types/astro.js').AstroStyleAttributes &
AstroDefineVarsAttribute;
// This is an unfortunate use of `any`, but unfortunately we can't make a type that works for every framework
diff --git a/packages/astro/config.d.ts b/packages/astro/config.d.ts
index fab3fe946..6e081a224 100644
--- a/packages/astro/config.d.ts
+++ b/packages/astro/config.d.ts
@@ -1,5 +1,5 @@
type ViteUserConfig = import('vite').UserConfig;
-type AstroUserConfig = import('./dist/@types/astro').AstroUserConfig;
+type AstroUserConfig = import('./dist/@types/astro.js').AstroUserConfig;
/**
* See the full Astro Configuration API Documentation
diff --git a/packages/astro/env.d.ts b/packages/astro/env.d.ts
index 10a61b06f..659f2972b 100644
--- a/packages/astro/env.d.ts
+++ b/packages/astro/env.d.ts
@@ -4,7 +4,7 @@
// As such, if the typings you're trying to add should be available inside ex: React components, they should instead
// be inside `client-base.d.ts`
-type Astro = import('./dist/@types/astro').AstroGlobal;
+type Astro = import('./dist/@types/astro.js').AstroGlobal;
// We have to duplicate the description here because editors won't show the JSDoc comment from the imported type
// However, they will for its properties, ex: Astro.request will show the AstroGlobal.request description
diff --git a/packages/astro/package.json b/packages/astro/package.json
index 805f92ac1..c3549db85 100644
--- a/packages/astro/package.json
+++ b/packages/astro/package.json
@@ -37,7 +37,10 @@
"./tsconfigs/*": "./tsconfigs/*.json",
"./jsx/*": "./dist/jsx/*",
"./jsx-runtime": "./dist/jsx-runtime/index.js",
- "./config": "./config.mjs",
+ "./config": {
+ "types": "./config.d.ts",
+ "default": "./config.mjs"
+ },
"./app": "./dist/core/app/index.js",
"./app/node": "./dist/core/app/node.js",
"./client/*": "./dist/runtime/client/*",
st/astro-sitemap-rss.test.js?h=fix-s-island-fallback&id=f008a19c9d4ad046ef7b24262605e8107c34a9bc&follow=1'>Fix sitemap.xml page urls (#2335)Gravatar Jonathan Neal 4-4/+8 2022-01-08[ci] collect statsGravatar FredKSchott 1-0/+1 2022-01-07Create .git-blame-ignore-revs (#2254)Gravatar Jonathan Neal 2-0/+8 2022-01-07Fix issue with plugins running twice in dev and build (#2323)Gravatar Jonathan Neal 2-2/+5 2022-01-07[ci] yarn formatGravatar matthewp 1-8/+8 2022-01-07[ci] release (#2339)astro@0.22.9Gravatar github-actions[bot] 28-39/+40 2022-01-07[ci] yarn formatGravatar matthewp 3-7/+8 2022-01-07Handle loading the Code package in the static build (#2337)Gravatar Matthew Phillips 8-4/+87 2022-01-07[ci] update lockfile (#2334)Gravatar Fred K. Schott 1-154/+154 2022-01-07[ci] yarn formatGravatar matthewp 1-8/+8 2022-01-07[ci] release (#2333)astro@0.22.8Gravatar github-actions[bot] 28-39/+40 2022-01-07[ci] collect statsGravatar FredKSchott 1-0/+1 2022-01-06[ci] yarn formatGravatar matthewp 4-54/+54 2022-01-06[ci] update lockfile (#2327)Gravatar Fred K. Schott 1-58/+64 2022-01-06Fix subpath support regressions (#2330)Gravatar Matthew Phillips 12-22/+566 2022-01-06[ci] yarn formatGravatar natemoo-re 1-2/+2 2022-01-06Added "IntelliSense for TypeScript" (#2326)astro@0.22.7Gravatar Morritz 1-0/+17 2022-01-06[ci] collect statsGravatar FredKSchott 1-0/+1 2022-01-06[ci] yarn formatGravatar FredKSchott 1-8/+8 2022-01-05[ci] release (#2320)Gravatar github-actions[bot] 31-54/+46 2022-01-05chore: update compiler (#2324)Gravatar Nate Moore 3-5/+10