Composition vs Inheritance? You’ll understand it. Build your own web framework? You’ll do it. Typescript with React/Redux? It’s here!
——————–
This is the best course online for mastering Typescript.
Every other course online teaches you the basic syntax and features of Typescript, but only this course will show you how to apply Typescript on real projects, instructing you how to build large, successful projects through example.
Typescript is a ‘super-set’ of Javascript. That means that if you already know Javascript, you are ready to take this course. Typescript adds in several important features to Javascript, including a type system. This type system is designed to help you catch errors during development, rather than when you are running your code. That means you’ll be twice as productive by catching bugs earlier in development. But besides the type system, Typescript also provides several tools for structuring large codebases and writing truly reusable code.
Mastering Typescript by reading the documentation alone is challenging. Although you might know what a ‘typed array’ or an ‘interface’ is, the documentation (and other courses!) don’t show you where to use this features, or how to use them effectively. The goal of this course is to help you understand why each feature of Typescript exists, and exactly where to use them.
Top companies are hungry for Typescript developers. Some of the largest web apps today are being built with Typescript. Employers are scrambling to find engineers who are fluent with this cutting edge system. Solid knowledge of Typescript will make you far more employable, by giving you a unique skill that few other engineers possess.
Planning on building your own apps? Using Typescript will help you structure your project correctly from day one, ensuring that you won’t be crushed under technical debt at some critical stage of your company. In this course, you’ll learn how to write reusable code, with a tremendous emphasis on leveraging classes and interfaces to make swappable ‘widgets’. You will be able to reconfigure your apps on the fly to build wildly different features with only a minimum amount of effort
Learn from someone who has worked on one of the largest Typescript projects around. On professional projects of my own, I have developed plugins for an open-source, browser-based code editor called Theia. The Theia project is absolutely gargantuan in scale, encompassing hundreds of thousands of lines of code, all written in Typescript. This project works only thanks to the power of Typescript.
But don’t just take my word for it – check out the reviews for this course! You’ll see that other engineers, just like yourself, have had great success and acquired a new understanding of how to build scalable web applications.
——————–
There is just too much content in this course to summarize in a few short words, but here is a partial listing of the different skills you’ll master:
-
Understand why Composition vs Inheritance is the most mis-understood topic in the Javascript community
-
Master the fundamental features of Typescript by working on real world projects
-
We’ll build a custom front-end framework from scratch that you can use in place of React or Angular on your own personal projects
-
Comprehend the complex interplay between classes and interfaces, and why these two pieces of Typescript enable you to build incredibly reusable code
-
Dive deeper into Typescript with decorators, which we’ll use to build a custom integration between Typescript and Express
-
Structure your React and Redux applications more confidently by understanding how to couple them with Typescript
-
Skip the documentation for third party libraries by fluently reading type definition files
-
Learn just how smart Typescript is by experiencing how deeply it analyzes your code for errors
I learned Typescript years ago by hard trial-and-error. Now you can learn at 5x the speed I did. This is the course that I wish I had when I first got started with Typescript.
Getting Started with Typescript
Dive into the essentials of TypeScript, exploring its purpose as essentially JavaScript with added type annotations to manage a type system. Understand how TypeScript helps catch errors during development, operating only at the coding stage and has no effect on runtime performance. Learn about TypeScript's development workflow, error-checking capabilities, and how its type annotations, although not present in the compiled JavaScript, facilitate error detection before execution in browsers or Node.js.
Embark on setting up a TypeScript environment by installing the TypeScript compiler and TS Node globally through npm. Also, learn how to configure Visual Studio Code for optimal TypeScript development, including adding it to the path variable, installing Prettier for consistent formatting, configuring single quotes, setting indentation preferences, and selecting the Solarized Light theme.
Learn to create a simple TypeScript application that fetches data from an API and prints it to the terminal. Explore the typical TypeScript workflow and see how it helps catch bugs during code writing by intentionally introducing errors. Understand setting up a project directory, creating a package.json, and using Axios to make network requests.
Dive into the practical aspects of TypeScript by creating the first application, which is a simple program using index.ts to fetch and console log JSON data using the Axios library. Learn how to compile TypeScript into JavaScript with the TypeScript compiler (TSC) and execute the compiled code with Node.js. Additionally, discover how TS-node can streamline this process by combining compilation and execution into one step.
Explore string templating in TypeScript to enhance readability of console output. Learn to destructure properties from an object for cleaner code and prepare for the introduction of TypeScript's features to prevent common errors, such as undefined variables in console logs, and more effectively manage data types.
Explore the power of TypeScript to catch and fix errors during development, focusing on fixing variable misnaming issues by defining object structures with interfaces. Learn to annotate response objects to validate property names and data types, observe how type assertions provide immediate editor feedback, and correct bad property references without executing code.
Explore the benefits of TypeScript by refactoring a JavaScript function into a separate helper with type annotations. Learn how adding types to function arguments can prevent and identify common errors, such as incorrect argument order, before running the code. Experience the efficiency gains by catching these issues during development, saving time and avoiding runtime surprises.
What is a Type System?
Learn the structure of this comprehensive TypeScript course, which emphasizes understanding both the language's syntax and the design patterns essential for writing reusable code. Begin with foundational lectures on TypeScript's syntax and features to grasp the basics, then progress to hands-on projects to master applying design patterns effectively.
Delve into the essentials of basic types in TypeScript, beginning with a definition and understanding the significance of types as shortcuts to refer to properties and functions of values. Explore the concept through examples, leading to a practical discussion on the usage of types to neatly summarize complex properties and methods for convenience and clarity in code.
Explore the essence of TypeScript types, including strings, numbers, booleans, and custom object types, and why they're fundamental for code error analysis and clarity. Understand the distinction between primitive and object types and how TypeScript's type system helps maintain code accuracy and aids other developers in grasping the structure of the codebase.
Dive into TypeScript fundamentals by exploring how to work with types through simple code snippets. Learn how TypeScript's type system allows developers to reference properties and functions of values, utilizing autocompletion for efficient coding and catching errors for non-existent properties or methods on data objects and instances of classes.
Understand the pervasive nature of types within TypeScript, recognizing that every value in an application has an associated type, which TypeScript leverages to ensure code quality and error checking. Embrace the fundamental concept that types are ubiquitous in TypeScript development.
Type Annotations in Action
Explore the concepts of type annotations and type inference in TypeScript and their application to variables, functions, and objects. Delve into how these features determine the type of values a variable will refer to, the balance between manual typing and relying on TypeScript's automatic type determination, and gain insights into practical use cases for each approach.
Dive into understanding type annotations in TypeScript by exploring code examples that highlight how to correctly use them with variables. Learn how to organize and implement type annotations for different data types, including number, string, boolean, null, and undefined, as well as instances of classes and built-in objects like the Date. Recognize the importance of type annotations in maintaining type safety and discover common error messages that arise from type mismatches.
Uncover the intricacies of complex type annotations in TypeScript, focusing on arrays, classes, and object literals. Learn how to create type annotations for arrays of strings, numbers, or Booleans. Dive into class annotations in TypeScript to differentiate between a class type and an instance. Master the syntax for annotating object literals, ensuring properties match specified types.
Explore TypeScript's syntax for type annotations with arrays, classes, object literals, and functions. Learn the intricacies of annotating a function's arguments and return type, grasping the distinction between the function's annotation and its implementation. Dissect the nuances of a function's expected arguments and the void return type, enhancing understanding of TypeScript's type system.
Explore the mechanism behind TypeScript's type inference, learning how it determines variable types without explicit annotations when declaration and initialization occur simultaneously. Understand when to utilize type inference for cleaner code and when to manually annotate types to aid TypeScript, including the handling of the `any` type to avoid potential issues.
Discover the importance of Type Annotations in TypeScript, especially when dealing with the 'any' type, which inhibits TypeScript's error-checking capabilities. Learn through an example with the `JSON.parse` function, which returns 'any' type, and understand why specifying types explicitly is essential for maintaining a robust and error-resistant codebase.
Learn how to add type annotations to objects in TypeScript for properties with known types, using a practical example of annotating the 'coordinates' object derived from `JSON.parse`. This tactic addresses the issue of the `any` type and allows for more predictable and safer code by specifying property types like numbers.
Explore manual type annotation in TypeScript when variable declaration and initialization occur on separate lines. Discover why type inference fails in this scenario and learn to add type annotations to avoid the `any` type issue, illustrated through a practical example involving a for loop and a boolean variable.
Learn the intricacies of TypeScript type annotations for variables whose types can't be inferred. Explore the use of type annotations in typescript through a practical example involving variables with multiple potential types, such as a Boolean or a number, and discover the syntax and rationale behind using pipe '|' for union types.
Annotations With Functions and Objects
Delve into the use of TypeScript's type annotations specifically for functions, including how to define argument types and return types. Examine a practical example by annotating a simple 'add' function, which takes two numbers as arguments and returns their sum, to ensure TypeScript accurately understands the function's input and output.
Explore how TypeScript type annotation enhances the reliability of functions by examining an 'add' function example. Learn the importance of specifying the argument types and the expected return type to prevent errors and understand why TypeScript does not ensure the logic within the function is correct. Gain insight into the distinction between mandatory annotations for arguments and optional, yet recommended, annotations for return types.
Explore alternative syntax for annotating TypeScript functions, focusing on functions declared with the 'function' keyword. Learn how to type arguments and return values for both named and anonymous functions assigned to variables, emphasizing consistent annotation practices for various function declarations.
Explore the usage of 'void' and 'never' return types in TypeScript functions. Delve into how 'void' indicates a function doesn't return a value, allowing for more accurate typing and error prevention. Learn the nuances of the 'never' type in functions that don't complete execution, providing clarity on functions designed to throw errors without returning.
Explore the finer nuances of using functions in TypeScript, such as object destructuring within function arguments complemented with type annotations. Learn how to extract properties directly in the parameters for cleaner code, emphasizing the separation of the destructuring syntax from the TypeScript type annotations for clarity and precision.
Explore advanced TypeScript concepts with objects, including object destructuring, nested objects, and method annotations. Discover how to annotate object structures and methods, use ES2015 syntax for defining object properties, and handle the intricacies of destructuring with type annotations for accurate type inference and code clarity.
Mastering Typed Arrays
Understand how TypeScript enhances JavaScript arrays by enforcing type consistency. Explore the use of type annotations and type inference for arrays, learn to initialize arrays with specific types, and delve into creating two-dimensional arrays. Examples include string arrays and arrays of objects, highlighting the necessity and methodology of using types in TypeScript for better coding practices.
Explore the intricacies of working with arrays in TypeScript, highlighting advantages such as automatic type inference when extracting values, which aids in maintaining type safety. Delve into how TypeScript prevents adding incompatible values into typed arrays, ensuring homogeneity, and discover how built-in functions like map, forEach, and reduce are enhanced with TypeScript's autocomplete features for more robust and error-free code.
Learn how to create typed arrays in TypeScript that can hold multiple data types, using the union type with the pipe operator to define an array capable of storing both Date objects and string literals. Gain insights into how specific type annotations can override type inference, ensuring arrays don't default to the 'any' type.
Unveil the nuances between using arrays and tuples in TypeScript to represent collections of records with similar types. Delve into the subtle differences that distinguish tuples from arrays, enabling a more precise representation of data structures.