Media is too big
VIEW IN TELEGRAM
15. Forbidding Implicit any
Mike demonstrates the next step in the TypeScript conversion, which is disallowing implicit any types. Setting the noImplicitAny flag to true for an entire project can be problematic since there's a wide surface area for changes. Instead, creating a new tsconfig file in an individual subfolder and starting there can make the process more incremental.
#lesson
Mike demonstrates the next step in the TypeScript conversion, which is disallowing implicit any types. Setting the noImplicitAny flag to true for an entire project can be problematic since there's a wide surface area for changes. Instead, creating a new tsconfig file in an individual subfolder and starting there can make the process more incremental.
#lesson
Media is too big
VIEW IN TELEGRAM
16. DefinitelyTyped & Versioning
Mike explains that declaration files, denoted by the .d.ts extension, contain type information but no runnable code. The community-run DefinitelyTyped repository is toured, and students are encouraged to contribute to projects that need type information or bug fixes. Challenges with versioning are also discussed.
#lesson
Mike explains that declaration files, denoted by the .d.ts extension, contain type information but no runnable code. The community-run DefinitelyTyped repository is toured, and students are encouraged to contribute to projects that need type information or bug fixes. Challenges with versioning are also discussed.
#lesson
Media is too big
VIEW IN TELEGRAM
17. Type Acquisitions
Mike explains where TypeScript looks for type declarations, such as the top level, type roots, explicit module declarations, and custom type roots. Prioritization of file types is discussed, and the importance of publishing accurate declaration files for libraries is emphasised.
#lesson
Mike explains where TypeScript looks for type declarations, such as the top level, type roots, explicit module declarations, and custom type roots. Prioritization of file types is discussed, and the importance of publishing accurate declaration files for libraries is emphasised.
#lesson
Media is too big
VIEW IN TELEGRAM
18. Pure Type Information
Mike defines interfaces for important components of the Slack app, such as messages, channels, teams, and users. These interfaces are applied in various parts of the codebase, including React components and data functions.
#lesson
Mike defines interfaces for important components of the Slack app, such as messages, channels, teams, and users. These interfaces are applied in various parts of the codebase, including React components and data functions.
#lesson
Media is too big
VIEW IN TELEGRAM
19. Typing React Props
Mike demonstrates two different methods for adding types to React component props. The React.FC type is favored over using a custom interface because it would require less refactoring if any core React functionality changed in a future version.
#lesson
Mike demonstrates two different methods for adding types to React component props. The React.FC type is favored over using a custom interface because it would require less refactoring if any core React functionality changed in a future version.
#lesson
Media is too big
VIEW IN TELEGRAM
20. Local Type Overrides
Mike demonstrates how to patch imported types locally in the project. Type declaration files can be created to override the types of imported modules, which removes blocks and allows a team to continue to develop while the imported library is fixed.
#lesson
Mike demonstrates how to patch imported types locally in the project. Type declaration files can be created to override the types of imported modules, which removes blocks and allows a team to continue to develop while the imported library is fixed.
#lesson
Media is too big
VIEW IN TELEGRAM
21. null, undefined & boolean Operators
Mike applies ESLint rules and increases the strictness of the files in the utils folder. Similar to defining an additional tsconfig file, the new ESLint rules can be defined in the overrides object and the rules can be scoped to a specific directory.
#lesson
Mike applies ESLint rules and increases the strictness of the files in the utils folder. Similar to defining an additional tsconfig file, the new ESLint rules can be defined in the overrides object and the rules can be scoped to a specific directory.
#lesson
Media is too big
VIEW IN TELEGRAM
22. Types at Runtime
Mike discusses type checking at runtime and introduces the concept of type guards. Performing full type checking at runtime can be expensive and slow down an application. Instead, using type guards to perform type checking at runtime can add type safety to API responses or other places in the application like a data layer.
#lesson
Mike discusses type checking at runtime and introduces the concept of type guards. Performing full type checking at runtime can be expensive and slow down an application. Instead, using type guards to perform type checking at runtime can add type safety to API responses or other places in the application like a data layer.
#lesson
Media is too big
VIEW IN TELEGRAM
23. Local Packages
Mike imports the chat-stdlib library project into the chat project using yarn workspaces. This simulates how a monorepo would be architected because it helps enable encapsulation and manage complexity. The library is added as a dependency in the project's package.json file and imports are refactored.
#lesson
Mike imports the chat-stdlib library project into the chat project using yarn workspaces. This simulates how a monorepo would be architected because it helps enable encapsulation and manage complexity. The library is added as a dependency in the project's package.json file and imports are refactored.
#lesson
Media is too big
VIEW IN TELEGRAM
24. Yarn Focus
Mike demonstrates the focus feature of Yarn workspaces, which removes unnecessary dependencies from the node modules folder, leaving only the dependencies needed for a specific part of the project. This allows for a more focused and efficient development process when working on different modules or components of a large-scale project.
#lesson
Mike demonstrates the focus feature of Yarn workspaces, which removes unnecessary dependencies from the node modules folder, leaving only the dependencies needed for a specific part of the project. This allows for a more focused and efficient development process when working on different modules or components of a large-scale project.
#lesson
Media is too big
VIEW IN TELEGRAM
25. Tests for Types
Mike compares positive and negative test cases for types in TypeScript. While positive test cases are easy to write, negative test cases are important to catch mistakes that should not be compilable. Two tools for writing negative test cases are introduced: DTS Lint and TSD.
#lesson
Mike compares positive and negative test cases for types in TypeScript. While positive test cases are easy to write, negative test cases are important to catch mistakes that should not be compilable. Two tools for writing negative test cases are introduced: DTS Lint and TSD.
#lesson
This media is not supported in your browser
VIEW IN TELEGRAM
26. Wrapping Up
Mike concludes the course with a summary of the objectives and the hope that this course gives engineers the tools to help manage complexity in large-scale applications.
#lesson
Mike concludes the course with a summary of the objectives and the hope that this course gives engineers the tools to help manage complexity in large-scale applications.
#lesson
Title: Intermediate TypeScript, v2
Description: Dive deeper into TypeScript's powerful features, including handling of extreme types, nullish values, ES modules, and advanced generics. Learn about namespaces, classes, top and bottom types, and practical use of conditional and mapped types.
Link: https://frontendmasters.com/courses/intermediate-typescript-v2/
Time: 5 hours, 3 minutes
Lessons: 33 / 33
Tags: #course #frontendmasters #720p
Description: Dive deeper into TypeScript's powerful features, including handling of extreme types, nullish values, ES modules, and advanced generics. Learn about namespaces, classes, top and bottom types, and practical use of conditional and mapped types.
Link: https://frontendmasters.com/courses/intermediate-typescript-v2/
Time: 5 hours, 3 minutes
Lessons: 33 / 33
Tags: #course #frontendmasters #720p
Frontendmasters
Intermediate TypeScript: Advanced Techniques for Types, Modules, and Generics
Dive into TypeScript's powerful features, including complex types, nullish values, ES modules, and advanced generics. Learn about namespaces, classes, top and bottom types, and conditional and mapped types.
Media is too big
VIEW IN TELEGRAM
1. Introduction
Mike North explains the goals of the course and course prerequisites which include having experience with modern JavaScript and basic knowledge of generics and type parameters. Instructions for setting up the workshop project is also covered in this segment.
- https://www.typescript-training.com/course/intermediate-v2
#lesson
Mike North explains the goals of the course and course prerequisites which include having experience with modern JavaScript and basic knowledge of generics and type parameters. Instructions for setting up the workshop project is also covered in this segment.
- https://www.typescript-training.com/course/intermediate-v2
#lesson
Media is too big
VIEW IN TELEGRAM
2. Course Overview
Mike provides an overview of the topics that will be covered in the course. Topics such as declaration merging, extreme types, nullish values, ES modules, generics, conditional types, mapped types, and variance over type params are mentioned.
#lesson
Mike provides an overview of the topics that will be covered in the course. Topics such as declaration merging, extreme types, nullish values, ES modules, generics, conditional types, mapped types, and variance over type params are mentioned.
#lesson
Media is too big
VIEW IN TELEGRAM
3. Identifiers
Mike explains how TypeScript allows for the creation of different importable and exportable things across module boundaries. The concept of namespaces and how multiple things can be stacked on top of each other in an identifier is also discussed in this segment.
- https://www.typescript-training.com/course/intermediate-v2/02-declaration-merging/
#lesson
Mike explains how TypeScript allows for the creation of different importable and exportable things across module boundaries. The concept of namespaces and how multiple things can be stacked on top of each other in an identifier is also discussed in this segment.
- https://www.typescript-training.com/course/intermediate-v2/02-declaration-merging/
#lesson
Media is too big
VIEW IN TELEGRAM
4. Namespaces
Mike discusses namespaces in JavaScript and uses jQuery as an example to explain how namespaces work. jQuery was used as a compatibility layer before standardized DOM APIs were available. A brief demonstration of using namespaces to organize and access functions and properties in JavaScript is also provided in this segment.
#lesson
Mike discusses namespaces in JavaScript and uses jQuery as an example to explain how namespaces work. jQuery was used as a compatibility layer before standardized DOM APIs were available. A brief demonstration of using namespaces to organize and access functions and properties in JavaScript is also provided in this segment.
#lesson
Media is too big
VIEW IN TELEGRAM
5. Classes
Mike demonstrates that classes in TypeScript are both types and values, and shows how the class declaration merges with the static field "createBanana" to create a namespace-like structure. The difference between TypeScript's read-only attributes and the Object.freeze() method is also discussed in this segment.
#lesson
Mike demonstrates that classes in TypeScript are both types and values, and shows how the class declaration merges with the static field "createBanana" to create a namespace-like structure. The difference between TypeScript's read-only attributes and the Object.freeze() method is also discussed in this segment.
#lesson
Media is too big
VIEW IN TELEGRAM
6. Top Types
Mike discusses extreme types in TypeScript, specifically the top and bottom types. The top type, "any", can accept any value and is often used when TypeScript cannot infer a more specific type. The top type, "unknown", requires type narrowing before it can be used.
- https://www.typescript-training.com/course/intermediate-v2/03-top-and-bottom-types/
#lesson
Mike discusses extreme types in TypeScript, specifically the top and bottom types. The top type, "any", can accept any value and is often used when TypeScript cannot infer a more specific type. The top type, "unknown", requires type narrowing before it can be used.
- https://www.typescript-training.com/course/intermediate-v2/03-top-and-bottom-types/
#lesson
Media is too big
VIEW IN TELEGRAM
7. Practical Uses of Top Types
Mike demonstrates how top types can be used to handle errors by using the `unknown` type in catch blocks to prevent assuming the type of the error. Using top types when receiving API responses from APIs that may change or when passing values through code that doesn't need to know about them.
#lesson
Mike demonstrates how top types can be used to handle errors by using the `unknown` type in catch blocks to prevent assuming the type of the error. Using top types when receiving API responses from APIs that may change or when passing values through code that doesn't need to know about them.
#lesson
Media is too big
VIEW IN TELEGRAM
8. object & Empty Objects
Mike discusses the object type which represents all possible values except for primitives, and it can accept functions as well. Various examples and use cases of the object type and how it can be used to remove nullability from a type by intersecting it with the empty object type are also covered in this lesson.
#lesson
Mike discusses the object type which represents all possible values except for primitives, and it can accept functions as well. Various examples and use cases of the object type and how it can be used to remove nullability from a type by intersecting it with the empty object type are also covered in this lesson.
#lesson