-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
Co-authored-by: Sarah Rainsberger <[email protected]> Co-authored-by: Bjorn Lu <[email protected]>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
'astro': major | ||
--- | ||
|
||
Changes the default `tsconfig.json` with better defaults, and makes `src/env.d.ts` optional | ||
|
||
Astro's default `tsconfig.json` in starter examples has been updated to include generated types and exclude your build output. This means that `src/env.d.ts` is only necessary if you have added custom type declarations or if you're not using a `tsconfig.json` file. | ||
|
||
Additionally, running `astro sync` no longer creates, nor updates, `src/env.d.ts` as it is not required for type-checking standard Astro projects. | ||
|
||
To update your project to Astro's recommended TypeScript settings, please add the following `include` and `exclude` properties to `tsconfig.json`: | ||
|
||
```diff | ||
{ | ||
"extends": "astro/tsconfigs/base", | ||
+ "include": ["**/*", ".astro/types.d.ts"], | ||
+ "exclude": ["dist"] | ||
} | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"extends": "astro/tsconfigs/base" | ||
"extends": "astro/tsconfigs/base", | ||
"include": ["**/*", ".astro/types.d.ts"], | ||
"exclude": ["dist"] | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"extends": "astro/tsconfigs/base" | ||
"extends": "astro/tsconfigs/base", | ||
"include": ["**/*", ".astro/types.d.ts"], | ||
"exclude": ["dist"] | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"extends": "astro/tsconfigs/base" | ||
"extends": "astro/tsconfigs/base", | ||
"include": ["**/*", ".astro/types.d.ts"], | ||
"exclude": ["dist"] | ||
} |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"extends": "astro/tsconfigs/base" | ||
"extends": "astro/tsconfigs/base", | ||
"include": ["**/*", ".astro/types.d.ts"], | ||
"exclude": ["dist"] | ||
} |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"extends": "astro/tsconfigs/base" | ||
"extends": "astro/tsconfigs/base", | ||
"include": ["**/*", ".astro/types.d.ts"], | ||
"exclude": ["dist"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
/// <reference path="../.astro/types.d.ts" /> | ||
declare namespace App { | ||
interface Locals { | ||
user: { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"extends": "astro/tsconfigs/base" | ||
"extends": "astro/tsconfigs/base", | ||
"include": ["**/*", ".astro/types.d.ts"], | ||
"exclude": ["dist"] | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"extends": "astro/tsconfigs/base" | ||
"extends": "astro/tsconfigs/base", | ||
"include": ["**/*", ".astro/types.d.ts"], | ||
"exclude": ["dist"] | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"extends": "astro/tsconfigs/base" | ||
"extends": "astro/tsconfigs/base", | ||
"include": ["**/*", ".astro/types.d.ts"], | ||
"exclude": ["dist"] | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"extends": "astro/tsconfigs/base" | ||
"extends": "astro/tsconfigs/base", | ||
"include": ["**/*", ".astro/types.d.ts"], | ||
"exclude": ["dist"] | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"extends": "astro/tsconfigs/base" | ||
"extends": "astro/tsconfigs/base", | ||
"include": ["**/*", ".astro/types.d.ts"], | ||
"exclude": ["dist"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"extends": "astro/tsconfigs/strict", | ||
"include": ["**/*", ".astro/types.d.ts"], | ||
"exclude": ["dist"] | ||
} |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"extends": "astro/tsconfigs/base" | ||
"extends": "astro/tsconfigs/base", | ||
"include": ["**/*", ".astro/types.d.ts"], | ||
"exclude": ["dist"] | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"extends": "astro/tsconfigs/base" | ||
"extends": "astro/tsconfigs/base", | ||
"include": ["**/*", ".astro/types.d.ts"], | ||
"exclude": ["dist"] | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"extends": "astro/tsconfigs/base" | ||
"extends": "astro/tsconfigs/base", | ||
"include": ["**/*", ".astro/types.d.ts"], | ||
"exclude": ["dist"] | ||
} |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"extends": "astro/tsconfigs/base" | ||
"extends": "astro/tsconfigs/base", | ||
"include": ["**/*", ".astro/types.d.ts"], | ||
"exclude": ["dist"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ | ||
"extends": "astro/tsconfigs/base" | ||
"extends": "astro/tsconfigs/base", | ||
"include": ["**/*", ".astro/types.d.ts"], | ||
"exclude": ["dist"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
{ | ||
"compilerOptions": { | ||
"importsNotUsedAsValues": "error" | ||
} | ||
}, | ||
"include": ["**/*", ".astro/types.d.ts"], | ||
"exclude": ["dist"] | ||
} |
This file was deleted.
This file was deleted.