Express and Typescript declaration files to extend Request object

Описание к видео Express and Typescript declaration files to extend Request object

In this lesson we will learn how to use declaration files in Typescript to teach the typescript compiler about added data we are adding to Express Request object.
We will learn about declaration files.
We will use declaration files to extend the Express.Request object.
We will learn about DefinitelyTyped declaration files
We will examine popular examples where you will have to use declaration files to teach the typescript compiler.

The full article and step by step guide is available here:
https://www.academeez.com/courses/exp...

#expressjs #typescript

0:00 Typescript is not aware of additional data on the request object
2:11 Lesson plan
4:27 Starting an Express with Typescript project
11:23 Piggy back on the Express Request object
14:50 Locale middleware
17:22 Declaration files
19:51 Creating a declaration file that extends Express.Request with locale data
25:03 Passport and creating declaration file for a module
32:30 DefinitelyTyped
37:35 Declaration file for overriding passport user on the Express.Request object
44:21 tsconfig options for telling typescript to consume your declaration files
50:04 Summary

Комментарии

Информация по комментариям в разработке