This repo presents 3 snippets of code containing circular dependencies. The goal is to solve each of these circular dependencies.
Running yarn test-circular
enables to identify circular dependencies.
If you are not familiar with dependency-cruiser, feel free to have a look at their documentation: https://github.com/sverweij/dependency-cruiser
This is an example of files in a common folder importing each other through the index.ts
file of the folder
Here, the circular dependency is due to a poor file architecture as files and variable instantiations are not splitted accordingly to the business logic.
This is a more complex variant of Exercise 2.
A PR containing the solutions of the 3 examples is opened. Each commit of the PR corresponds to the solution to one example.