Skip to content

TypeScript

This projects uses TypeScript and as such, the most safest and most efficient way to leverage it is by using strict types.

tsconfig.json
{
"extends": "astro/tsconfigs/strictest",
"compilerOptions": {
...
},
"exclude": [
"./node_modules/*"
]
}

You can change this behaviour by swapping the "extends" property:

tsconfig.json
{
"extends": "astro/tsconfigs/strictest",
"extends": "astro/tsconfigs/strict",
"compilerOptions": {
...
},
"exclude": [
"./node_modules/*"
]
}

Path alias

DARST also automatically aliases ./src/* to @/*.

tsconfig.json
{
"extends": "astro/tsconfigs/strictest",
"compilerOptions": {
...
"paths": {
"@/*": [
"./src/*"
]
},
},
"exclude": [
"./node_modules/*"
]
}