@@ -147,8 +147,8 @@ export class ContainerInstance {
147
147
*/
148
148
getAsync < T > ( identifier : ServiceIdentifier < T > ) : Promise < T > {
149
149
const globalContainer = Container . of ( undefined ) ;
150
- let service = globalContainer . findService ( identifier ) ;
151
- let scopedService = this . findService ( identifier ) ;
150
+ const service = globalContainer . findService ( identifier ) ;
151
+ const scopedService = this . findService ( identifier ) ;
152
152
153
153
if ( service && service . global === true ) return this . getServiceValueAsync ( identifier , service ) ;
154
154
@@ -472,7 +472,7 @@ export class ContainerInstance {
472
472
if ( service . factory instanceof Array ) {
473
473
// use special [Type, "create"] syntax to allow factory services
474
474
// in this case Type instance will be obtained from Container and its method "create" will be called
475
- value = ( ( await this . getAsync ( service . factory [ 0 ] ) ) as any ) [ service . factory [ 1 ] ] ( ...params ) ;
475
+ value = ( await this . getAsync ( service . factory [ 0 ] ) ) [ service . factory [ 1 ] ] ( ...params ) ;
476
476
} else {
477
477
// regular factory function
478
478
value = service . factory ( ...params , this ) ;
@@ -488,6 +488,7 @@ export class ContainerInstance {
488
488
// need to be injected, and user can use provided container to get instances he needs
489
489
params . push ( this ) ;
490
490
491
+ // eslint-disable-next-line prefer-spread
491
492
value = new ( type . bind . apply ( type , params ) ) ( ) ;
492
493
}
493
494
0 commit comments