You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following scenario is applicable for Typescript (only) I guess:
Is it possible to resolve dependencies when a class constructor is defined to have an interface instead of another class?
Consider the following scenario:
interface ITransport -> is defined and has get() method
Class Http -> implements ITransport interface
Class Service -> has a constructor with a paramerter of type ITransport
Is there a way we can use
ReflectiveInjector.resolveAndCreate([Service, Http])
Ideally if Http implements ITransport then shouldn't the dependency resolver be able to inject it automatically when creating an instance of Service class?
The text was updated successfully, but these errors were encountered:
The following scenario is applicable for Typescript (only) I guess:
Is it possible to resolve dependencies when a class constructor is defined to have an interface instead of another class?
Consider the following scenario:
interface ITransport -> is defined and has get() method
Class Http -> implements ITransport interface
Class Service -> has a constructor with a paramerter of type ITransport
Is there a way we can use
ReflectiveInjector.resolveAndCreate([Service, Http])
Ideally if Http implements ITransport then shouldn't the dependency resolver be able to inject it automatically when creating an instance of Service class?
The text was updated successfully, but these errors were encountered: