Circular dependencies

A circular dependency is an issue that we can encounter when working with multiple components and dependencies. Sometimes it is possible to reach a point in which one component (A) has a dependency on a second component (B), which depends on the first component (A). In the following diagram, each node is a component, and we can observe that the nodes circular1.ts and circular2.ts (in red) have a circular dependency. The nodes without dependencies are displayed in green, and those with dependencies but no issues are displayed in blue:

The circular dependencies don't necessarily need to involve just two components. We can ...

Get Learning TypeScript 2.x - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.