typescript 我在NestJs中找不到描述部分

pgccezyw  于 2023-03-04  发布在  TypeScript
关注(0)|答案(1)|浏览(77)

大家好,在我看的培训中,每个人都有这样的解释,但我没有。我试了所有的插件,但都做不出来。我该怎么处理呢?提前感谢。
大家好,在我看的培训中,每个人都有这样的解释,但我没有。我试了所有的插件,但都做不出来。我该怎么处理呢?提前感谢。
PS
我使用vscode。我已经尝试了所有与NestJs相关的插件。在所有教程中,当他们在例如Controller(|)。

41zrol4v

41zrol4v1#

这是JSDocs,来自node_modules/@nestjs/common/decorators/core/controller.decorator.d.ts
如果按住Ctrl键并单击@Controller(转到定义),则应获得:

/**
 * Decorator that marks a class as a Nest controller that can receive inbound
 * requests and produce responses.
 *
 * An HTTP Controller responds to inbound HTTP Requests and produces HTTP Responses.
 * It defines a class that provides the context for one or more related route
 * handlers that correspond to HTTP request methods and associated routes
 * for example `GET /api/profile`, `POST /users/resume`.
 *
 * A Microservice Controller responds to requests as well as events, running over
 * a variety of transports [(read more here)](https://docs.nestjs.com/microservices/basics).
 * It defines a class that provides a context for one or more message or event
 * handlers.
 *
 * @see [Controllers](https://docs.nestjs.com/controllers)
 * @see [Microservices](https://docs.nestjs.com/microservices/basics#request-response)
 *
 * @publicApi
 */
export declare function Controller(): ClassDecorator;

这意味着您已经在本地存储库中安装了@nestjs/common包。

确保未安装冲突的VS代码扩展/代码段/插件。

相关问题