/**
* 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;
1条答案
按热度按时间41zrol4v1#
这是JSDocs,来自
node_modules/@nestjs/common/decorators/core/controller.decorator.d.ts
如果按住Ctrl键并单击
@Controller
(转到定义),则应获得:这意味着您已经在本地存储库中安装了
@nestjs/common
包。确保未安装冲突的VS代码扩展/代码段/插件。