UNPKG

grand-connectors

Version:

A Grandjs package for applying repository pattern for nodejs and javascript applications using typescript

32 lines (31 loc) 977 B
/** * @package @GrandConnectors * @author Tarek Salem * MIT License */ /** * ============================================================================== * File Role: Main File * ============================================================================== */ import { IDataSource, IRepository, ServiceModes } from "./types"; import { InjectDataSource, InjectModel, InjectService, loadClass } from "./decorators"; declare abstract class Repository implements IRepository { dataSources: { [key: string]: DataSource; }; Models: { [key: string]: { DataSource: DataSource; Model?: any; Entity?: any; }; }; } declare abstract class DataSource implements IDataSource { abstract type: string; constructor(); private init; abstract connect(): any; } export { DataSource, Repository, IDataSource, ServiceModes, IRepository, InjectDataSource, InjectModel, InjectService, loadClass };