TypeScript from zero: tsconfig, tsc, and your first project

Practical notes for shipping software.

Languages & runtimes Beginner 6 min read

First published: 2026-04-02 — part of the Utilhub editorial calendar. Bookmark /how-to/typescript-first-project-tsconfig-tsc for updates as we refine commands for new OS and toolchain releases.

TypeScript from zero: tsconfig, tsc, and your first project — a practical guide for developers, scoped to Languages & runtimes at a Beginner level. You will get vocabulary, a concrete path to first success, verification signals, and production-minded cautions you can apply on real systems.

Goal

Produce a minimal TypeScript project that compiles with tsc, uses tsconfig.json, and can grow toward Node or bundlers later.

Initialize

mkdir my-ts-app && cd my-ts-app
npm init -y
npm install --save-dev typescript @types/node
npx tsc --init

Tighten tsconfig

Enable strict, set target to a modern ECMAScript level, and choose moduleResolution appropriate for Node (node16/nodenext) or bundlers. Use rootDir and outDir so sources stay separate from emitted JS.

First compile

Add src/index.ts, then run npx tsc. Fix type errors at compile time rather than in production.

Verify

  • npx tsc --noEmit for CI-style typecheck without writing files.
  • Add a npm run build script wrapping tsc.

Frequently asked questions

How do I report an issue with this guide?

Use the contact page and include your OS version and the command output you saw.

Can I reuse this internally?

Yes for internal playbooks; keep vendor trademarks and licenses in mind when redistributing.

Does this replace official vendor docs?

No—it compresses the path for busy builders. Follow links to PostgreSQL, Kubernetes, or cloud provider documentation for exhaustive references.

Related Utilhub guides

Browse the full how-to library with category and level filters.