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.


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


Property Modifiers Type Description
prototype   R  


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