Skip to content

Overview & Quick Start

TypeScript compiler standards

@nexload-sdk/typescript-config

v5.9.3 Stable Released

Shared TypeScript configurations for the Nexload SDK monorepo

TypeScript 5+Node.jsBrowserNext.js

@nexload-sdk/typescript-config provides battle-tested, strict TypeScript configurations tailored for modern TypeScript 5.9+ runtimes and frameworks. It eliminates boilerplate and enforces strict type boundaries across libraries, microservices, and web applications.


Extend the target preset directly in your project’s tsconfig.json:

tsconfig.json
{
"extends": "@nexload-sdk/typescript-config/node.json",
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./src"
},
"include": ["src/**/*"]
}

The package ships explicit subpath exports for each runtime archetype:

Preset SubpathTarget EnvironmentKey Compiler Options
@nexload-sdk/typescript-config/base.jsonUniversal base for all TypeScript projectstarget: ES2022, moduleResolution: NodeNext, moduleDetection: force, strict: true
@nexload-sdk/typescript-config/node.jsonNode.js backend services and CLI toolsExtends base, lib: ["ES2023"], typed Node globals
@nexload-sdk/typescript-config/react.jsonClient React libraries and single-page appsjsx: react-jsx, lib: ["DOM", "DOM.Iterable", "ES2023"]
@nexload-sdk/typescript-config/next.jsonNext.js App Router applicationsjsx: preserve, plugins: [{ name: "next" }], isolated module safety
@nexload-sdk/typescript-config/vite.jsonVite frontend applicationsmoduleResolution: Bundler, jsx: react-jsx, client DOM types

All presets inherit from base.json with maximum compiler safety enabled:

  • moduleDetection: "force": Treats every TypeScript file as a module automatically, preventing ambient global scope pollution without needing empty export {} statements.
  • forceConsistentCasingInFileNames: true": Prevents subtle filesystem case-sensitivity crashes between macOS/Windows and Linux CI containers.
  • noImplicitOverride: true: Guarantees that subclass method overrides are explicitly marked with the override keyword.
  • noImplicitReturns: true: Ensures all code paths within a function explicitly return a value.
  • noFallthroughCasesInSwitch: true: Catches accidental switch fallthrough bugs during compilation.
  • exactOptionalPropertyTypes: true: Distinguishes between omitted properties and properties explicitly assigned undefined.

Terminal window
pnpm add -D @nexload-sdk/typescript-config typescript@^5.9.0

Peer requirement: typescript >= 5.0.0.