A base TSConfig for working with Node LTS providing curated TypeScript configuration optimized for Node.js Long Term Support versions
npx @tessl/cli install tessl/npm-tsconfig--node-lts@20.1.0@tsconfig/node-lts provides a curated TypeScript configuration base specifically designed for Node.js LTS (Long Term Support) versions. It offers a standardized tsconfig.json setup that developers can extend in their projects, featuring optimized compiler options including ES2023 library support, Node16 module resolution, ES2022 target compilation, and strict type checking enabled.
npm install --save-dev @tsconfig/node-ltsThis package is used through TypeScript configuration inheritance, not code imports:
{
"extends": "@tsconfig/node-lts/tsconfig.json"
}npm install --save-dev @tsconfig/node-ltstsconfig.json:{
"extends": "@tsconfig/node-lts/tsconfig.json",
"compilerOptions": {
// Your project-specific overrides
"outDir": "./dist",
"rootDir": "./src"
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}Provides a base TypeScript configuration optimized for Node.js LTS versions that can be extended in project tsconfig.json files.
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Node LTS",
"_version": "20.1.0",
"compilerOptions": {
"lib": ["es2023"],
"module": "node16",
"target": "es2022",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"moduleResolution": "node16"
}
}The package configures the following TypeScript compiler options:
{
"lib": ["es2023"]
}Enables ES2023 standard library definitions, providing access to the latest JavaScript features supported by Node.js LTS.
{
"module": "node16",
"moduleResolution": "node16"
}node16 for Node.js 16+ compatibility{
"target": "es2022"
}Targets ES2022 JavaScript features, optimized for Node.js LTS runtime capabilities.
{
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true
}{
"$schema": "https://json.schemastore.org/tsconfig"
}Provides JSON schema reference for IDE validation and IntelliSense support in TypeScript configuration files.
{
"_version": "20.1.0"
}Internal version identifier for the configuration template.
{
"extends": "@tsconfig/node-lts/tsconfig.json",
"compilerOptions": {
"outDir": "./build",
"declaration": true
},
"include": ["src/**/*"]
}{
"extends": [
"@tsconfig/strictest/tsconfig.json",
"@tsconfig/node-lts/tsconfig.json"
],
"compilerOptions": {
"outDir": "./dist"
}
}{
"extends": "@tsconfig/node-lts/tsconfig.json",
"compilerOptions": {
"target": "es2020",
"moduleResolution": "node",
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
}
}
}The configuration is consumed by:
tsc command for compilationProvides automatic configuration for:
Compatible with popular Node.js build systems:
TypeScript will report configuration errors if:
The configuration ensures compatibility with Node.js LTS versions. Using features not supported by the target Node.js version may result in runtime errors despite successful compilation.
{
"extends": "@tsconfig/node-lts/tsconfig.json",
"compilerOptions": {
"lib": ["es2023", "dom"]
}
}{
"extends": "@tsconfig/node-lts/tsconfig.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@core/*": ["src/core/*"],
"@utils/*": ["src/utils/*"]
}
}
}{
"extends": "@tsconfig/node-lts/tsconfig.json",
"references": [
{ "path": "./packages/core" },
{ "path": "./packages/utils" }
]
}