Open wack17s opened 6 years ago
I have a similar issue, the @Provides(MyAbstractClass)
doesn't work:
Following the documentation: https://github.com/thiagobustamante/typescript-ioc#a-note-about-classes-and-interfaces
// My abstract class
export abstract class IMachineSrv {}
// My concrete class
@Provides(IMachineSrv) export class MbMachineSrv implements IMachineSrv {}
//My client consuming the concrete one
@Inject private _machineSrv:IMachineSrv;
As result I get _machineSrv
as an instance of the abstract class (IMachineSrv
), while I should I get an instance of the concrete MbMachineSrv
thanks to @Provides(IMachineSrv)
annotation. Is that correct?
Many thanks. F.
I use this lib with React Native and just faced very strange issue with release version of IOS. (in ios debug and android all works good).
i had next code:
to provide config in class constructor and i got next issue:
I had just to change order of decorators to fix it:
works as expected.
Also, my tsconfig, may be something wrong here: