16 lines
405 B
TypeScript
16 lines
405 B
TypeScript
import AxeRepository from "./axeRepository";
|
|
import QuizRepository from "~/repositories/quizRepository";
|
|
import QuestionRepository from "~/repositories/questionRepository";
|
|
|
|
const repositories = {
|
|
axe: AxeRepository,
|
|
quiz: QuizRepository,
|
|
question: QuestionRepository,
|
|
// other repositories ...
|
|
};
|
|
|
|
export const RepositoryFactory = {
|
|
// @ts-ignore
|
|
get: (name: string) => repositories[name]
|
|
};
|