Description
Let’s test this statement by checking if Nest allows us to easily follow one of the SOLID principles: the Dependency Inversion Principle. To explain how to implement DIP, let’s first consider the…
Summary
- High-level modules should not depend on low-level modules.
- The answer is what happens with interfaces during the transpiling process from TypeScript to JavaScript.
- The problem is that we will lose all information about the RepositoryService interface’s existence and what should be injected to the AppController, and basically, it is not possible to pass an interface as a property value inside module providers.
- Medium is an open platform where 170 million readers come to find insightful and dynamic thinking.