16 lines
405 B
TypeScript
16 lines
405 B
TypeScript
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]
|
|
};
|