Skip to content

tsconfig.json: The Settings That Matter

A practical guide to TS compiler options interviewers ask about: strict, noImplicitAny, lib, moduleResolution, jsx, and incremental builds.

Rajesh DhimanFebruary 08, 20261 min read
On this page

30‑second interview answer

tsconfig.json controls how TypeScript checks and emits code. The most important choice is enabling strict mode for correctness. In frontend projects, jsx, lib, and moduleResolution affect compatibility, while options like noUncheckedIndexedAccess can catch real bugs. For large repos, incremental builds speed up compilation.


The high-impact options

strict

Turns on a bundle of checks:

  • noImplicitAny
  • strictNullChecks
  • more

Interview stance:

“Strict mode is worth it for long-term maintainability.”

strictNullChecks

Forces you to handle null/undefined.

noImplicitAny

Prevents silent any.


Frontend-specific options

  • jsx: preserve / react-jsx
  • lib: include DOM/ES features
  • module + moduleResolution: ESM/CJS behavior

Incremental builds

  • incremental: true
  • tsBuildInfoFile

Helps speed in large codebases.


Common mistakes

  • Turning off strict to “fix errors fast”
  • Not including dom in lib for browser apps

Mini Q&A

Q1: Why strict mode?

  • fewer runtime bugs.

Q2: What does strictNullChecks do?

  • null/undefined must be handled.

Q3: Why incremental?

  • faster rebuilds.

Summary checklist

  • I know strict is the big one.
  • I can explain strictNullChecks.
  • I can explain jsx/moduleResolution basics.
  • I know incremental build benefits.
Companion Book

Looking for structured, offline interview prep?

Free online lessons • Portable Amazon Kindle / Paperback

Frontend Interview Guide (2025 Edition) cover
Recommended for React & Frontend Rounds

Frontend Interview Guide (2025 Edition)

By Rajesh Dhiman

Comprehensive preparation covering React internals, Web Performance, CSS architecture, and system design questions.

View on Amazon ↗Kindle & Paperback
JavaScript Interview Guide cover
Recommended for Core JS Rounds

JavaScript Interview Guide

By Rajesh Dhiman

Deep dive into the Event Loop, microtask draining, closures, prototypal inheritance, and asynchronous execution patterns.

View on Amazon ↗Kindle & Paperback

Note: All lessons on Frontend Interview remain completely free to read online. As an Amazon Associate, we may earn from qualifying purchases.

RD

Written by Rajesh Dhiman

Authored by Rajesh Dhiman and engineered at Eunix Tech. Focused on deep-dive frontend engineering, JavaScript runtime internals, React architecture, and web performance.