TypeScript for JavaScript Developers

What will you Learn?

Introduction to TypeScript

  • What is TypeScript?
    • Overview, benefits, and comparison with JavaScript
    • Setting up TypeScript:
      • Installing TypeScript, configuring tsconfig.json
      • Basic Types:
        • string, number, boolean, null, undefined, any, void and never
        • Type Inference & Annotations:
          • Implicit vs explicit types
          • Type Aliases:
            • Defining custom types with type
            • Basic Functions:
              • Type annotations in function parameters and return types

              Intermediate TypeScript

              • Union & Intersection Types:
                • Combining multiple types
                • Interfaces vs. Types:
                  • Differences, use cases, and extending interfaces
                  • Type Assertion:
                    • Casting and converting types
                    • Enums:
                      • Numeric and string enums
                      • Arrays & Tuples:
                        • Typed arrays, multi-type tuples
                        • Generics:
                          • Creating reusable, type-safe components and functions
                          • Type Narrowing:
                            • Control flow based type inference (typeof, instanceof, in, etc.)

                            Advanced TypeScript

                            • Classes & Inheritance:
                              • Type-safe OOP in TypeScript, abstract classes, and inheritance
                              • Access Modifiers:
                                • Public, Private, Protected, and Readonly
                                • Decorators:
                                  • Introduction to decorators and use cases in classes
                                  • Namespaces & Modules:
                                    • Organizing TypeScript code with namespaces and ES6 modules
                                    • Mapped Types:
                                      • Creating types dynamically using mapped types
                                      • Conditional Types:
                                        • Using extends to define types conditionally

                                        TypeScript in the Real World

                                        • TypeScript with React:
                                          • Introduction to using TypeScript with React.js (including types for props and state)
                                          • TypeScript with Node.js:
                                            • Server-side TypeScript and integrating with Express.js
                                            • TypeScript and REST APIs:
                                              • Defining types for HTTP requests and responses
                                              • TypeScript and NoSQL Databases:
                                                • Integrating with databases like MongoDB
                                                • Error Handling:
                                                  • Best practices for handling errors with TypeScript

                                                  Advanced TypeScript Techniques

                                                  • Utility Types:
                                                    • Built-in utility types (Partial, Required, Pick, Omit, etc.)
                                                    • Type Guards:
                                                      • Advanced type narrowing with custom type guards
                                                      • Advanced Generics:
                                                        • Constraints and multiple generics
                                                        • TypeScript with Webpack:
                                                          • Configuration and bundling TypeScript with Webpack
                                                          • Declaration Files:
                                                            • Writing and using .d.ts files
                                                            • Third-Party Libraries:
                                                              • Using TypeScript with external JavaScript libraries

                                                              Project and Deployment

                                                              • Building a TypeScript Project:
                                                                • Hands-on project that integrates TypeScript with either a frontend framework (React, Angular) or backend (Node.js)
                                                                • Deploying TypeScript Projects:
                                                                  • Packaging and deploying TypeScript applications (with Webpack, Vercel, Heroku, etc.).
                                                                  • Performance Optimization:
                                                                    • Tips for improving performance in large TypeScript codebases
                                                                    • Best Practices & Patterns:
                                                                      • Code organization, naming conventions, and TypeScript design patterns