@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
32 lines (21 loc) • 948 B
Markdown
lang: en
title: 'API docs: rest.restcomponent._constructor_'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/rest
permalink: /doc/en/lb4/apidocs.rest.restcomponent._constructor_.html
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/rest](./rest.md) > [RestComponent](./rest.restcomponent.md) > [(constructor)](./rest.restcomponent._constructor_.md)
## RestComponent.(constructor)
Constructs a new instance of the `RestComponent` class
<b>Signature:</b>
```typescript
constructor(app: Application, config?: RestComponentConfig);
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| app | [Application](./core.application.md) | |
| config | [RestComponentConfig](./rest.restcomponentconfig.md) | |