Skip to content
_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN DE
Let's talk

TypeScript from Scratch

14. 09. 2019 Updated: 24. 03. 2026 1 min read intermediate
This article was published in 2019. Some information may be outdated.

TypeScript adds types to JavaScript. It catches errors at compile time and improves DX. Today it’s the standard for serious projects.

Basic Types

// Primitive types let name: string = ‘Jan’; let age: number = 30; let active: boolean = true; // Interface interface User { id: number; name: string; email: string; role?: ‘admin’ | ‘user’; // Optional + union } // Generics function first(items: T[]): T | undefined { return items[0]; } // Utility types type PartialUser = Partial; type UserWithoutId = Omit;

tsconfig.json

{ “compilerOptions”: { “target”: “ES2022”, “module”: “NodeNext”, “strict”: true, “noUncheckedIndexedAccess”: true, “outDir”: “dist” } }

Key Takeaway

strict: true from the start. Interface for objects, type for unions. Generics for reusable code.

typescriptprogrammingjavascript
Share:

CORE SYSTEMS team

We build core systems and AI agents that keep operations running. 15 years of experience with enterprise IT.