UNPKG

@loopback/docs

Version:

Documentation files rendered at [https://loopback.io](https://loopback.io)

39 lines (25 loc) 1.32 kB
--- lang: en title: 'API docs: repository.baserepositoryclass' 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.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) ## BaseRepositoryClass interface Signature for repository classes that can be used as the base class for `define*` functions. The constructor of a base repository class accepts the target model constructor and the datasource to use. `define*` functions require a class implementing this interface on input. <b>Signature:</b> ```typescript export interface BaseRepositoryClass<M extends typeof Model, R extends Repository<PrototypeOf<M>>> ``` ## Properties | Property | Type | Description | | --- | --- | --- | | [prototype](./repository.baserepositoryclass.prototype.md) | R | | ## Methods | Method | Description | | --- | --- | | [(new)(modelClass, dataSource)](./repository.baserepositoryclass._new_.md) | The constructor for the generated repository class |