---
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/strongloop/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

<b>Signature:</b>

```typescript
new (modelClass: M, dataSource: juggler.DataSource): R;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  modelClass | M | Model class |
|  dataSource | juggler.DataSource | DataSource object |

<b>Returns:</b>

R


