TypeScript Foundations
Learn TypeScript from scratch, as its own language. No JavaScript background assumed and nothing framed as 'JavaScript plus types' — the runtime facts you need arrive when you need them. Ends with a real program you built, typed and ran yourself.
Start courseWhat you will cover
- Why TypeScript Exists and What It Runs OnThe class of bug types catch before your program ever runs, what the compiler does and pointedly does not do, and where the code you write actually executes.25 min
- Setting Up and Running Your First FileGetting from nothing to a running, type-checked file: the runtime, the compiler, a real project folder, and what each generated file is for.25 min
- Values, Variables, and Basic TypesNaming values with let and const, the basic types, and why you usually let the compiler infer a type instead of writing it out.25 min
- Strings and Template LiteralsBuilding text, template literals over concatenation, the string methods worth knowing, and why every string operation gives you a new string.25 min
- Numbers and Floating PointOne number type for everything, the arithmetic that surprises you, NaN and how it spreads, and what to reach for when you are counting money.25 min
- Booleans, Conditions, and Truthinessif and else, why === is the comparison you use, and the falsy values that make an innocent condition reject a legitimate zero or empty string.25 min
- Null, undefined, and Strict Null ChecksTwo different kinds of nothing, the errors they cause at runtime, and how strict null checking turns that whole category of crash into a compile error.25 min
- Arrays and TuplesOrdered collections of a single type, fixed-length tuples where position carries meaning, and the index access that types promise but do not check.25 min
- Objects and Type AliasesDescribing the shape of your data, naming that shape so it can be reused, optional and readonly properties, and why an object type is a contract rather than a class.25 min
- Functions, Parameters, and Return TypesDeclaring functions, optional and default parameters, what void really means, and functions as values you can pass to other functions.25 min
- Union Types and NarrowingThe central idea of TypeScript: a value that could be one of several types, and how the compiler follows your checks to work out which one it is on each branch.25 min
- Interfaces Versus Type AliasesTwo ways to name a shape, what each can do that the other cannot, and a rule for choosing that will not start an argument in code review.25 min
- Enums and Literal TypesFixed sets of allowed values, why a union of string literals is usually the better tool, and what an enum actually compiles into.25 min
- Loops and IterationWalking a collection with for...of, repeating until a condition changes, break and continue, and the loop over object keys that hands you strings you did not expect.25 min
- Working with Collectionsmap, filter and reduce and the types that flow through them; Map and Set for lookups and uniqueness; and why a plain object is a poor dictionary.25 min
- Classes and ObjectsFields, constructors, methods and access modifiers; how a class is both a value and a type; and the many problems a plain function and an object type solve better.25 min
- Errors and Exceptionsthrow, try and catch; why a caught value is unknown rather than an Error; defining your own error types; and the empty catch block that turns a bug into a mystery.25 min
- Promises and Async AwaitWhy some work does not finish immediately, what a promise represents, async and await, and the forgotten await that makes a function return before its work is done.25 min
- Modules, Import, and ExportSplitting a program across files, named and default exports, what a relative import path resolves to, and keeping the dependency arrows pointing one way.25 min
- Configuring the CompilerThe tsconfig options that change how much the compiler protects you, what target and module actually control, and why strict should be on from the first day.25 min
- Your First Real TypeScript ProgramBuilding a small tool end to end: modules, types at the edges, async work, error handling and a first test — every earlier lesson assembled into one working thing.25 min