Skip to content

TypeScript Config

Opinionated and reusable TypeScript configurations, geared towards modern build tooling in both monorepos and single repositories.

  • Uses the TypeScript compiler for type-checking only
  • Assumes your bundler outputs code, sourcemaps, and type declarations
  • Requires TypeScript 6.0 or later
  • Builds on TS6 strict defaults with additional strictness
  • Assumes src and dist directories
  • Provides ~/ and @/ path aliases for src
  • Uses ${configDir} for zero per-project configuration

Shared configs are an exception

The shared-library and shared-react-library configs enable composite, declaration, and declarationMap because project references require TypeScript to emit declarations. Your bundler still handles the JavaScript output.

To use this successfully, you need a modern bundler like tsdown. You can check out the typescript-monorepo boilerplate for a working example of a modern monorepo setup with tsdown.

These configurations are also compatible with TSGo, the native Go port of the TypeScript compiler.

Released under the MIT License.