Page Contents

Home > @loopback/repository > BaseRepositoryClass

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.

Signature:

export interface BaseRepositoryClass<M extends typeof Model, R extends Repository<PrototypeOf<M>>> 

Properties

Property Modifiers Type Description
prototype   R  

Methods

Method Description
(new)(modelClass, dataSource) The constructor for the generated repository class