addAlias<TService extends Object, TImplementation extends TService> method

void addAlias<TService extends Object, TImplementation extends TService>([
  1. bool isGenerated = false
])

Registers a transient service of the specified TService type implemented as an alias for the specified TImplementation type. TImplementation must implement TService.

Implementation

void addAlias<TService extends Object, TImplementation extends TService>([
  bool isGenerated = false,
]) {
  add(ServiceDescriptor.alias<TService, TImplementation>(isGenerated));
}