
Explore the core of TypeScript through structured modules, with optional sections on JavaScript classes, and guidance on integrating TypeScript with Webpack and React.
Ensure you have foundational JavaScript knowledge before this course, as TypeScript builds on JavaScript. Master variables, arrays, objects, functions, conditionals, and loops; classes, DOM, and React are optional.
Explore why TypeScript, a superset of JavaScript, adds a type system to prevent common bugs, undefined and null errors, and missing properties.
Discover how TypeScript adds a static type system to JavaScript for pre-runtime error checking as you type and compiles to JavaScript with interfaces and types.
Install TypeScript globally with npm install -g typescript, verify with npm -v and tsc -v, and ensure node and npm from nodejs.org so tsc is available in any terminal.
Explore the TypeScript Playground to write TypeScript without installs, run code, and view side-by-side compiled JavaScript. Access examples on enums, adjust TS Config, and share or export your code.
Install and configure Visual Studio Code, use its built-in terminal and shortcuts, and start writing TypeScript without extra setup, with optional themes like Material Theme Palenight High Contrast.
Discover how to use TypeScript with a local workflow: create .ts files, leverage editor errors for immediate feedback, and compile to JavaScript using tsc, mastering both editing and compilation.
Learn how to apply type annotations in TypeScript by declaring string variables, enforcing types in functions and objects, and catching mismatches with helpful method suggestions like toUpperCase.
Annotate variables with TypeScript primitive types like number and boolean, ensuring values remain the correct type. Compare with string and note that string, number, and boolean are common primitives.
Explore how TypeScript compiles to JavaScript by running tsc on a .ts file. Observe type errors in the editor and terminal and the final variables.js output.
Discover how TypeScript uses type inference to deduce variable types from assigned values, reducing the need for explicit annotations while showing when to annotate for string, boolean, or number.
Explore the any type in TypeScript as an escape hatch that accepts any value and disables type checking, not recommended; see let thing: any and calling it as a function.
Learn how declaring a variable separately from initialization requires a type annotation to avoid implicit any in TypeScript, as shown with foundMovie set to a string.
Learn to annotate function parameters and return values in TypeScript using colon syntax, avoid the any type, and enforce string and number types in functions like square and greet.
Define parameters with explicit types in TypeScript using arrow function doSomething(person: string, age: number, isFunny: boolean). TypeScript warns about wrong counts and types and enforces the string, number, boolean order.
Explore how to set default values for typed parameters in TypeScript, using the correct syntax of parameter: type = default after the annotation, illustrated with a greet example.
Learn how to annotate function return types in TypeScript, after the parameter list, including number, string, or union returns, and how annotations aid readability and prevent errors across function forms.
See how TypeScript infers anonymous function parameter types from context when mapping a colors string array, enabling uppercasing without explicit annotations.
Explains the void type as the return type for functions that don’t return anything, showing an example function printTwice and the difference between implicit and annotated void.
Explore the never type in TypeScript, a return type for functions that should never return, such as when a function throws or loops forever, unlike void.
Practice TypeScript by implementing twoFer and isLeapYear with type annotations, default parameters, and arrow functions, then verify leap year logic using modulo tests and console logs.
Explore TypeScript object literals and shape annotations, using string and number properties, and enforce them in functions such as printName that require a first and last name.
Annotate function parameters, return types, and variables with object types in TypeScript, using object literals like { x: number, y: number }.
Examine why excess properties cause errors for inline object literals in TypeScript, compare inline objects to variables, and explain how known properties govern extra fields like age.
Learn how type aliases reuse types by naming object shapes, like a point with x and y numbers, and use them in functions such as doublePoint to return points.
Learn to annotate nested objects in TypeScript, modelling a song with title, artist, numStreams, and credits with producer and writer, and define a Song type for payouts.
Make properties optional in TypeScript by using a question mark, turning z optional in a 3-dimensional point, with x and y required.
Use TypeScript's read only modifier to mark object properties as immutable, preventing reassignment like a user id; you can read value and mutate referenced objects, but not reassign the property.
Master intersection types in TypeScript by combining Circle and Colorful with an ampersand to form ColorfulCircle. Extend intersections with new properties, as shown by CatDog including age.
Define a TypeScript movie type with a read-only title and optional original title, including box office data, and implement get profit to compute worldwide gross minus budget.
Learn how to annotate arrays in TypeScript with string[], number[], and boolean[]; avoid empty array pitfalls, ensure type safety when pushing values, and enforce single-type arrays.
Learn the alternate Array<T> syntax in TypeScript, including arrays of booleans and a Point type with X and Y numbers, and compare it to the square-bracket form.
Define and type multi-dimensional arrays in TypeScript by using nested arrays, such as two-dimensional strings for a tic-tac-toe board, and extend to three-dimensional arrays with proper nesting.
Practice TypeScript by typing arrays: create a number array ages, a two-dimensional string array gameBoard, and a Product type with name and price, then write getTotal to sum prices.
Explains union types in TypeScript by allowing variables to be numbers or strings, and optionally booleans; demonstrates point and location types with latitude and longitude and a distance function.
Explore type narrowing with union types by handling a price that may be number or string, using typeof checks, string replacement, and parseFloat to safely compute tax.
Declare arrays of a single type, use union types for arrays of numbers or strings with proper parentheses and brackets, and pattern objects like points or locations.
Master literal types in TypeScript and learn to constrain variables to exact values, like 0 or yes, by combining them with union types using the pipe character.
Explore union types in TypeScript by creating variables, arrays, and color types for RGB and HSL. Build a greeting function that handles a single name or an array of names.
Explore TypeScript tuples, fixed-length arrays with a prescribed order of types, such as rgb color with three numbers, and enforce strict element positions using array syntax.
Explore how to define and use tuples in TypeScript, including number-first patterns, mixed types, and the practical limits of pushing beyond fixed length.
Learn how TypeScript enums define a set of named constants, such as order statuses (pending, shipped, delivered, returned), to improve code readability and reuse across your app.
Explore how TypeScript enums assign numeric values by default, override them with numbers or strings—including string enums like ArrowKeys—and benefit from named constants and autocomplete.
Explore how TypeScript enums compile to JavaScript, creating underlying objects or erased code with const enums, and why auto complete and namespace management matter for practical use.
Explore interfaces in TypeScript to describe the shape of objects, showing how the interface keyword defines properties like X and Y as numbers, and how objects implement this shape.
Explore interfaces with optional properties using the question mark and enforce required fields like first name and last name in a Person example, with a read-only id.
Describe how to add methods to a TypeScript interface, including zero-argument and string-returning methods like say hi, using arrow and colon syntaxes.
Explore how to define interface methods with named parameters and types, enforce applyDiscount returning a number on every product, and validate parameters like amount and discount.
Reopen interfaces to extend them by adding new properties, as shown when a Dog gains breed and bark that returns a string, while Person combines with age; interfaces are merged, not overwritten.
Extend interfaces to inherit from a base interface, as in service dog extending dog, adding a job field while preserving name, age, breed, and bark.
Explore how interfaces extend multiple other interfaces to form a complex engineer type, combining name, read-only id, email, level, and languages in TypeScript.
Compare interfaces and type aliases to learn how interfaces describe object shapes, can be reopened and extended using the extends keyword, and how type aliases describe unions and intersections.
Configure the TypeScript compiler with tsconfig.json via tsc --init, explore common settings, and compile index.ts to index.js in VS Code or the browser.
Master watch mode in TypeScript using tsc -w to automatically recompile on file changes, see live errors in VS Code, and understand how adding properties triggers type checks.
Explore working with multiple TypeScript files, define a product interface with price, name, and quantity, and compile automatically with tsc in default and watch modes.
Learn how to tell TypeScript to compile only a subset of files using the top-level files option in tsconfig.json, with include and exclude as broader alternatives.
Explore how TypeScript's include and exclude options control which files to compile, using patterns and the files option in tsconfig.json. Learn how defaults, source directory targeting, and excludes work together.
Set the out dir option to emit compiled JavaScript into a separate dist directory. Run tsc with your config to place outputs in dist rather than alongside the source files.
Explore TypeScript's target option, which determines the JavaScript version emitted (ES5 vs ES2015+). See how changing target enables arrow functions and const in output by compiling to ES5.
Explore how enabling the strict option in TypeScript strengthens type checks, enforcing no implicit any and strict null checks to improve program correctness with practical examples.
Explore key TypeScript compiler options, including modules, allowJs, checkJs, sourceMap, noEmit, and noEmitOnError, to understand how type checking guides error reporting and emission.
Welcome to the best resource online for mastering TypeScript.
TypeScript is a powerful superset of JavaScript that makes development smoother, safer, and helps you catch errors and avoid bugs early on. TypeScript adds a bunch of useful features to the JavaScript that you know and love. It helps you be a more productive developer and forces you to write better code.
TypeScript has skyrocketed in popularity to become one of the world’s most popular and loved programming languages. It has doubled in popularity every year since 2017, and it continues to grow at an astronomical rate. It’s definitely the right time to learn TypeScript!
This course covers all the syntax, features, and concepts you need to master TypeScript and start using it in your own codebases. We start with the very basics of the type system and cover everything up to incorporating TypeScript in React codebases and using Webpack with TypeScript.
Here’s a detailed breakdown of the topics the course covers:
The TypeScript type system
Union Types
Intersection Types
Tuples and Enums
Interfaces
The TypeScript compiler and how to configure it
Working with the DOM and TypeScript
TypeScript Classes
Generics
Type Narrowing
Type Declarations
Working with 3rd party libraries
Webpack + TypeScript workflows
Integrating React and TypeScript
TypeScript’s Module System
Enroll in this course to learn what TypeScript is, why it’s so popular, and how to use it!