有@types/express 的文档吗?

问题描述 投票:0回答:1

我从一本书中学到我可以像这样用 TypeScript 键入express:

import express, { Request, Response, NextFunction } from 'express';
const app = express();
app.use((err: Error, req: Request, res: Response, next: NextFunction) => {
});

我仍然不清楚大家是如何获得这个代码的。我确信快速声明文件导出这些类型(Request、Response、NextFunction),但我不能确信它是正确的类型。

我也找不到任何@types/express 文档。

TypeScript 工程师如何找到每个库的打字方式?

typescript express
1个回答
0
投票

我也在查看文档网站,以便我可以更好地理解打字稿。但这些不是这样的网站。您是否找到了这方面的文档或任何资源,如果有,请向我提供资源链接?

© www.soinside.com 2019 - 2024. All rights reserved.