Practive of Dependency Inversion & Injection

What?

The codes to practice dependency inversion & injection in TypeScript.

Why?

I want a minimal example of dependency inversion & injection to understand well.

How?

You can try in order from step1.ts.

  1. step1.ts: You need to implement dependency inversion so that the domain is not tightly coupled to the repository.
  2. step2.ts: You need to implement dependency injection.
  3. step3.ts: The final code.