Would require a way / format to specify if the argument is another service or just a string.
// An HTTP client service
class HTTPClient {}
// An API service
class API {
/**
* @param {HTTPClient} client
* @param {String} hostname
*/
constructor(client, hostname = 'localhost') {
}
}
// It would be nice to inject scalar as parameter without having to define a parameter for it.
container.registerDefinition('client', HTTPClient);
container.registerDefinition('api', API, ['client', 'http://my.domain.com:8080']);
Would require a way / format to specify if the argument is another service or just a string.