The codes to practice dependency inversion & injection in TypeScript.
I want a minimal example of dependency inversion & injection to understand well.
You can try in order from step1.ts
.
step1.ts
: You need to implement dependency inversion so that the domain is not tightly coupled to the repository.step2.ts
: You need to implement dependency injection.step3.ts
: The final code.