@letumfalx/tsconfig
v0.1.0
Published
Extensible base TypeScript configurations.
Readme
@letumfalx/tsconfig
An opinionated TypeScript configuration that I use across all @letumfalx repositories. It focuses on modern TypeScript defaults, strict type safety, sensible compiler options, and fast incremental builds while remaining easy to extend.
📦 Installation
Install the package as a development dependency in your project:
npm install -d @letumfalx/tsconfig
# bun
bun add -d @letumfalx/tsconfig
# pnpm
pnpm add -d @letumfalx/tsconfig🚀 Usage
Create a tsconfig.json file in the root of your project and extend the configuration that matches your environment.
1. Base Setup (CLI, Servers, Isomorphic Utilities)
For standard packages or backend/CLI environments without DOM access:
{
"extends": "@letumfalx/tsconfig",
"compilerOptions": {
"rootDir": ".",
"outDir": "./dist"
},
"include": ["src/**/*.ts"]
}2. Browser Setup (UI, Canvas apps, DOM interaction)
{
"extends": "@letumfalx/tsconfig/browser.json",
"compilerOptions": {
"rootDir": ".",
"outDir": "./dist"
},
"include": ["src/**/*.ts", "src/**/*.tsx"]
}3. Web Worker Setup
For off-main-thread processing, ensuring DOM APIs are restricted while allowing worker-specific globals:
{
"extends": "@letumfalx/tsconfig/webworker.json",
"compilerOptions": {
"rootDir": ".",
"outDir": "./dist"
},
"include": ["src/**/*.worker.ts"]
}