boussole-pluss/frontend/repositories/RepositoryFactory.ts

16 lines
405 B
TypeScript
Raw Normal View History

2022-10-07 14:15:53 +00:00
import AxeRepository from "./axeRepository";
import QuizRepository from "~/repositories/quizRepository";
import QuestionRepository from "~/repositories/questionRepository";
2022-10-07 14:15:53 +00:00
const repositories = {
axe: AxeRepository,
quiz: QuizRepository,
question: QuestionRepository,
2022-10-07 14:15:53 +00:00
// other repositories ...
};
export const RepositoryFactory = {
// @ts-ignore
get: (name: string) => repositories[name]
};