
Explore TypeScript basics, from installing and compiling to JavaScript, to using type annotations, type narrowing and guards, interfaces, unions and intersection types, and object oriented concepts like classes and inheritance.
Install Node.js and npm, verify npm works, install TypeScript globally with npm, and test the TypeScript compiler with tsc to compile ts to js.
Download or clone the course code from GitHub and open it in VS Code to follow along. Code along or watch; VS Code supports JavaScript, TypeScript, and Python.
Install and configure Visual Studio Code from official page, apply the provided settings JSON, install coding tools extension pack and TypeScript extension pack, and prepare for TypeScript to JavaScript compilation.
Learn to set up a TypeScript project, configure tsconfig, create npm scripts for compile, watch, and start, and run with a local light server to see compiled JavaScript.
Explore TypeScript's primitive types string, number, and boolean, and learn how type annotations enable compile-time checks, prevent runtime errors, and reveal type mismatches before execution.
Explore arrays and tuples in TypeScript, using type inference and fixed-size tuples of three numbers, while TypeScript enforces compile-time checks to prevent runtime errors.
Define the TypeScript object type with properties like name, age, and courses. Use it to annotate a user object and a function parameter, and leverage IntelliSense for code clarity.
Explore the any, void, and undefined types in TypeScript, why any disables type checking, how void indicates no return value, and how undefined marks an initial state.
Explore union types in a TypeScript crash course, by allowing number or string with a union, using type cards and Typekit runtime checks to handle mixed inputs and return types.
Discover how to define a type alias with the type keyword for a number or string union in TypeScript, name it edible, and reuse it across functions to simplify refactoring.
Define a user interface in TypeScript, compare it to a type alias, and show name, age, and crosses as string[]; note interfaces are more flexible and can extend other interfaces.
extend an existing TypeScript interface by creating a new interface that inherits all properties with the extends keyword, then add a new property such as permission level (student, instructor, admin).
Learn how to create a type intersection in TypeScript by merging a user type alias with a permission type alias using the ampersand, yielding a single type with merged properties.
Explore TypeScript type guards and the typeof operator to distinguish strings, numbers, booleans, functions, objects, arrays, and undefined at runtime, and apply truthiness narrowing.
Explore how TypeScript enums define a fixed set of categories, compare them with string unions, and use values like permissionLevel.instructor and permissionLevel.student in code.
Explore generic functions in TypeScript, using a type parameter to write functions that work with any input type, such as a first element of an array or a generic map.
Constrain generic functions in TypeScript by requiring a length property via an interface. Satisfy the constraint on arrays while objects without length trigger errors, demonstrating the extends-based constraint approach.
Explore property modifiers in TypeScript by adding optional properties with a question mark and using readonly to fix a value at initialization, with practical 2d point examples.
Learn how to define a TypeScript constructor, initialize x and y properties for a 2d point, and extend to a 3d point using super to pass values and set z.
Explore TypeScript member visibility by using public, protected, and private keywords, understand default public access, how protected allows subclass access, and how private restricts access to the defining class.
Explains how to implement getters and setters in TypeScript by exposing private or protected properties through public accessors, use of read-only when only get exists, and naming conventions with underscores.
Explore static properties of a class that are shared by all instances, such as the dimensions for 2D and 3D points, defined on the class itself.
Learn to build a generic class in TypeScript, a data box that stores a content of any type, using a constructor and length-based constraints.
Define a TypeScript interface for an appointment with a start time and description, then implement it in a class using the implements keyword and a print method.
Master abstract classes in TypeScript by defining an abstract base class with protected properties and an abstract method, then implement it in a subclass using a super constructor.
Explore importing and exporting classes and functions across TypeScript files using CommonJS styles, with named imports, aliases, and namespace wildcards. Learn to export with export keyword and use relative paths.
Learn to overload functions in TypeScript by defining multiple signatures for print coordinates and implementing a single function that handles a point object or two numbers.
Explore how to narrow types in TypeScript using type guards and the instance of operator, distinguishing user and atman objects by their name and id and printing relevant properties.
Explore the keyof operator in TypeScript to safely access object properties by name. Constrain keys to the object's interface to enable autocomplete and prevent indexing by invalid strings.
Explore constraining a generic function to a union of user or admin types. Apply keyof on the generic type to enable auto completion and correct property keys for each branch.
Learn how rest parameters use the three-dot syntax to accept any number of numeric arguments, convert them to an array, and compute sums with for each.
Explore TypeScript utility types that transform interfaces, turning properties optional with Partial, making all fields required with Required, and shaping types with Pick and Omit.
Thank you for learning TypeScript and sticking around. Write a review to help tailor this course as new features are released monthly.
Course description:
The course will show you the most important features of TypeScript. In the beginning, we will install and set up the required software together. After that, we will start with the basics and work our way up to classes and inheritance. You are also welcome to watch the public videos of the course to get a taste of it.
What is TypeScript?
If you haven’t heard of TypeScript yet, it’s a language that builds on JavaScript by adding syntax for static types. Tools like the TypeScript compiler just erase those types, leaving you with clean readable JavaScript that you can run anywhere; but those types are there to be type-checked! Types make your intentions explicit, and tools can read and understand them to catch errors before you even run your code. By checking your types, TypeScript can catch errors like typos, logic errors, and more! Beyond catching errors, TypeScript also uses types to power editor toolings like accurate code completion, go-to-definition, and renaming.
The course has the following topics
Installation of TypeScript, NodeJS, and VSCode
Type Annotations for Number, String, Boolean, Arrays, Tuples, etc.
Functions, Interfaces, and Classes
Inheritance and Abstract Classes
Importing/exporting from Modules
Utility types, keyof, instanceof, and type guards
Become a professional today, in the technology of tomorrow!
See you in class!