Courses

Learn TypeScript

14 lessons · 0 completed

Start
0%
  1. 1 Introduction to TypeScript: The Typed JavaScript The "Why" Before the "How": Why TypeScript?Setting up the Environment: Node, tsc, and tsconfigYour First TypeScript Program: "Hello World"Understanding the Compilation Process: TS to JS
  2. 2 Basic Types: Classifying Your Data Primitive Types: string, number, and booleanType Inference: Letting TypeScript Do the Heavy LiftingThe 'any' Type: When to Use It (and Why to Avoid It)Working with Arrays and Tuples
  3. 3 Functions: Typing Your Logic Typing Function Parameters and Return ValuesOptional and Default ParametersRest Parameters for Variable ArgumentsUnderstanding 'void' and 'never' Types
  4. 4 Interfaces: Contracts for Objects Defining Object Shapes with InterfacesOptional (?) and Readonly PropertiesExtending Interfaces: Building Complex ShapesIndex Signatures for Dynamic Objects
  5. 5 Union and Intersection Types: Combining Types Union Types (|): Allowing Multiple TypesType Narrowing: Type Guards and typeofIntersection Types (&): Merging Multiple TypesLiteral Types for Strict Value Control
  6. 6 Type Aliases vs Interfaces Creating Custom Types with the 'type' KeywordKey Differences Between Type Aliases and InterfacesBest Practices: When to Choose 'type' over 'interface'
  7. 7 Enums and Constants: Managing Defined States Numeric Enums: Counting with NamesString Enums: Clearer Debugging and ReadabilityThe 'as const' Assertion for Immutable Literal Values
  8. 8 Classes: Object-Oriented TypeScript Class Fundamentals and ConstructorsAccess Modifiers: public, private, and protectedShorthand Initialization: Parameter PropertiesImplementing Interfaces in Classes
  9. 9 Generics: Writing Reusable, Flexible Code The Concept of Generics: Type Variables ExplainedCreating Generic Functions and Arrow FunctionsGeneric Interfaces and ClassesAdding Constraints to Generics (extends keyword)
  10. 10 Type Assertions and Casting The 'as' Keyword: Telling TypeScript You Know BetterAngle Bracket Syntax vs 'as' SyntaxNon-Null Assertion Operator (!)Safe Casting: Unknown to Specific Type
  11. 11 Advanced Type Manipulation The 'keyof' Operator: Extracting Object KeysThe 'typeof' Operator in Type ContextsMapped Types: Transforming Existing TypesConditional Types: If/Else Logic for Types
  12. 12 Utility Types: Built-in Type Helpers Partial and Required: Managing Property OptionalityPick and Omit: Selecting Specific PropertiesReadonly and Record UtilitiesReturnType and Parameters for Function Types
  13. 13 Asynchronous TypeScript and Error Handling Typing Promises and Async/Await FunctionsFetching Data: Typing Complex API ResponsesCatching Errors: Safely Typing the 'unknown' Error Object
  14. 14 Modules, Third-Party Libs, and Configuration ES Modules in TypeScript: Exporting and ImportingDeep Dive into tsconfig.json: Strict Mode & TargetWorking with Third-Party Libraries (@types and DefinitelyTyped)Structuring a Standard TypeScript Project