0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

feat(next): reference astro/client from astro/config (#11925)

This commit is contained in:
Florian Lefebvre 2024-09-11 14:40:15 +02:00 committed by GitHub
parent 518433e433
commit 74722cb81c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
59 changed files with 64 additions and 57 deletions

View file

@ -13,7 +13,7 @@ To update your project to Astro's recommended TypeScript settings, please add th
```diff
{
"extends": "astro/tsconfigs/base",
+ "include": ["**/*", ".astro/types.d.ts"],
+ "include": [".astro/types.d.ts", "**/*"],
+ "exclude": ["dist"]
}
```

View file

@ -0,0 +1,7 @@
---
'astro': minor
---
Updates `astro/config` import to reference `astro/client` types
When importing `astro/config`, types from `astro/client` will be made automatically available to your project. If your project `tsconfig.json` changes how references behave, you'll still have access to these types after running `astro sync`.

View file

@ -1 +0,0 @@
/// <reference path="../.astro/types.d.ts" />

View file

@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -1,6 +1,6 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"],
"compilerOptions": {
"strictNullChecks": true

View file

@ -1,6 +1,6 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"],
"compilerOptions": {
"jsx": "preserve"

View file

@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -1,6 +1,6 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"],
"compilerOptions": {
// Needed for TypeScript intellisense in the template inside Vue files

View file

@ -1,6 +1,6 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"],
"compilerOptions": {
// Preact specific settings

View file

@ -1,6 +1,6 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"],
"compilerOptions": {
"jsx": "react-jsx",

View file

@ -1,6 +1,6 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"],
"compilerOptions": {
// Solid specific settings

View file

@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -1,6 +1,6 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"],
"compilerOptions": {
// Needed for TypeScript intellisense in the template inside Vue files

View file

@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/strict",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -1,6 +1,6 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"],
"compilerOptions": {
"resolveJsonModule": true

View file

@ -1,6 +1,6 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"],
"compilerOptions": {
"strictNullChecks": true

View file

@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -1,6 +1,6 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"],
"compilerOptions": {
// Preact specific settings

View file

@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -163,7 +163,7 @@
```diff
{
"extends": "astro/tsconfigs/base",
+ "include": ["**/*", ".astro/types.d.ts"],
+ "include": [".astro/types.d.ts", "**/*"],
+ "exclude": ["dist"]
}
```

View file

@ -1,3 +1,4 @@
/// <reference path='./client.d.ts' />
type ViteUserConfig = import('vite').UserConfig;
type ViteUserConfigFn = import('vite').UserConfigFn;
type AstroUserConfig = import('./dist/types/public/config.js').AstroUserConfig;

View file

@ -5,6 +5,6 @@
"jsx": "react-jsx",
"jsxImportSource": "react"
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -5,6 +5,6 @@
"jsx": "react-jsx",
"jsxImportSource": "react"
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -2,6 +2,6 @@
"compilerOptions": {
"importsNotUsedAsValues": "error"
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -4,6 +4,6 @@
// This is only needed because we link Astro locally.
"preserveSymlinks": true
},
"include": ["./src/**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "./src/**/*"],
"exclude": ["dist"]
}

View file

@ -4,6 +4,6 @@
"jsx": "react-jsx",
"jsxImportSource": "react"
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -4,6 +4,6 @@
"jsx": "react-jsx",
"jsxImportSource": "react"
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -4,6 +4,6 @@
"jsx": "react-jsx",
"jsxImportSource": "react"
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -3,6 +3,6 @@
"jsx": "react-jsx",
"jsxImportSource": "react"
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -2,6 +2,6 @@
"compilerOptions": {
"baseUrl": "./src"
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -14,6 +14,6 @@
]
}
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -1,5 +1,5 @@
{
"extends": "astro/tsconfigs/base",
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -8,6 +8,6 @@
]
},
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -6,6 +6,6 @@
"~/assets/*": ["src/assets/*"]
},
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -3,6 +3,6 @@
"compilerOptions": {
"baseUrl": ".",
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -3,6 +3,6 @@
"compilerOptions": {
"baseUrl": ".",
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -6,6 +6,6 @@
"~/assets/*": ["src/assets/*"]
},
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -6,6 +6,6 @@
"~/assets/*": ["src/assets/*"]
},
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -8,6 +8,6 @@
]
},
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -4,6 +4,6 @@
"jsxImportSource": "solid-js",
"types": ["astro/client"]
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -4,6 +4,6 @@
"jsx": "react-jsx",
"jsxImportSource": "react"
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -4,6 +4,6 @@
"jsx": "react-jsx",
"jsxImportSource": "react"
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -6,6 +6,6 @@
"~/assets/*": ["src/assets/*"]
},
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -4,6 +4,6 @@
"jsx": "react-jsx",
"jsxImportSource": "preact"
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}

View file

@ -6,6 +6,6 @@
"~/assets/*": ["src/assets/*"]
},
},
"include": ["**/*", ".astro/types.d.ts"],
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}