Working with Dependencies

In the previous chapter, we learned how to work with classes and interfaces. We also learned about the SOLID principles and other object-oriented programming best practices. In this chapter, we will learn how to work with dependencies. The first part of the chapter will focus on the usage of modules. The second part of the chapter will focus on the management of dependencies in object-oriented programming.

We are going to cover the following topics:

  • Third-party dependencies
  • Internal modules
  • External modules
  • Asynchronous module definition (AMD)
  • CommonJS modules
  • ES6 modules
  • Browserify and universal module definition (UMD)
  • Circular dependencies
  • Dependency injection

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.