TypeScript

Type-safe JavaScript with TypeScript

187 tutorials
12 of 187 tutorials
Jul 17, 2026· 6 min read

TypeScript Project Setup for Beginners

Set up a complete TypeScript project from scratch. Create a tsconfig.json, organize source and output folders, add build scripts, and run your code with one command.

TypeScript
Jul 17, 2026· 6 min read

Type Annotations in TypeScript

A type annotation tells TypeScript exactly what type a variable, parameter, or return value should be. Learn the syntax, where annotations go, and when to use them.

TypeScript
Jul 17, 2026· 6 min read

Type Inference in TypeScript

Type inference lets TypeScript figure out types automatically from the values you assign. Learn how inference works, where it shines, and when you still need annotations.

TypeScript
Jul 17, 2026· 7 min read

String Number and Boolean Types in TypeScript

TypeScript's string, number, and boolean types map directly to JavaScript primitives. Learn how to use each one, what values they accept, and common mistakes to avoid.

TypeScript
Jul 17, 2026· 7 min read

Any vs Unknown in TypeScript

Any and unknown both accept every type, but any disables type checking while unknown forces you to narrow the type first. Learn the critical difference and when to use each.

TypeScript
Jul 17, 2026· 7 min read

Void and Never in TypeScript

Void means a function returns nothing useful. Never means a function never returns at all. Learn the difference, when to use each, and how never enables exhaustiveness checking.

TypeScript
Jul 17, 2026· 7 min read

Null and Undefined in TypeScript

Null means no value, undefined means not assigned yet. Learn how TypeScript's strictNullChecks prevents the most common runtime error in JavaScript, and how to safely handle missing values.

TypeScript
Jul 17, 2026· 7 min read

Enums in TypeScript Explained

An enum is a way to define a set of named constants in TypeScript. Learn numeric enums, string enums, const enums, and when to use enums versus union types.

TypeScript
Jul 17, 2026· 8 min read

Common TypeScript Beginner Mistakes

New TypeScript developers make the same mistakes: skipping parameter types, overusing any, and forgetting that types disappear at runtime. Learn to spot and fix the most frequent errors.

TypeScript
Jul 17, 2026· 5 min read

Readonly Values in TypeScript

Readonly values in TypeScript prevent accidental mutation. Learn readonly properties, ReadonlyArray, readonly tuples, the Readonly utility type, and how readonly differs from const.

TypeScript
Jul 17, 2026· 5 min read

Default Parameters in TypeScript

A default parameter provides a fallback value when the caller omits an argument. Learn how TypeScript infers the type from the default and how defaults differ from optional parameters.

TypeScript
Jul 17, 2026· 6 min read

Create a tsconfig File

A tsconfig.json file tells TypeScript how to compile your project. Learn how to create one, what the key sections mean, and which options to set first.

TypeScript