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 QuestionRepository from "~/repositories/questionRepository";
import QuizRepository from "~/repositories/quizRepository";
const repositories = {
axe: AxeRepository,
question: QuestionRepository,
quiz: QuizRepository,
// other repositories ...
};
export const RepositoryFactory = {
// @ts-ignore
get: (name: string) => repositories[name]
};