Express and Typescript declaration files to extend Request object

academeez
academeez
1.6 هزار بار بازدید - پارسال - In this lesson we will
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 source code of this lesson is available here:
https://github.com/ywarezk/academeez/...

#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
پارسال در تاریخ 1402/02/08 منتشر شده است.
1,642 بـار بازدید شده
... بیشتر