---
lang: en
title: 'API docs: repository.baserepositoryclass._new_'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/repository
permalink: /doc/en/lb4/apidocs.repository.baserepositoryclass._new_.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [BaseRepositoryClass](./repository.baserepositoryclass.md) &gt; [(new)](./repository.baserepositoryclass._new_.md)

## BaseRepositoryClass.(new)

The constructor for the generated repository class

**Signature:**

```typescript
new (modelClass: M, dataSource: juggler.DataSource): R;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  modelClass | M | Model class |
|  dataSource | juggler.DataSource | DataSource object |

**Returns:**

R


