A service with dependencies has dependencies in the constructor that we need help resolving. Without this resolution process, we can't create the service. Such a service may look like this:
export class Service { constructor( Logger logger: Logger, repository:Repository ) {}}
In this code, our service has two dependencies. Upon constructing a service, we need one Logger instance and one Repository instance. It would be entirely possible for us to find the Logger instance and Repository instance by typing something like this:
import { Service } from './service'import logger from './logger';import { Repository } from './repository';// create the servicelet service = new Service( logger, new Repository() )
This is ...