fix(modules-sdk): check if dependency is registered (#3620)

* fix: check if dependency is registered

* changeset
This commit is contained in:
Carlos R. L. Rodrigues
2023-03-29 08:47:12 +02:00
committed by GitHub
parent 8ddb3952c0
commit 55e94d0b45
3 changed files with 11 additions and 6 deletions
+1 -5
View File
@@ -7,7 +7,6 @@ import {
FilterableInventoryLevelProps,
FilterableReservationItemProps,
FindConfig,
IEventBusService,
IInventoryService,
InventoryItemDTO,
InventoryLevelDTO,
@@ -28,21 +27,19 @@ import ReservationItemService from "./reservation-item"
type InjectedDependencies = {
manager: EntityManager
eventBusService: IEventBusService
inventoryItemService: InventoryItemService
inventoryLevelService: InventoryLevelService
reservationItemService: ReservationItemService
}
export default class InventoryService implements IInventoryService {
protected readonly manager_: EntityManager
protected readonly eventBusService_: IEventBusService | undefined
protected readonly inventoryItemService_: InventoryItemService
protected readonly reservationItemService_: ReservationItemService
protected readonly inventoryLevelService_: InventoryLevelService
constructor(
{
eventBusService,
manager,
inventoryItemService,
inventoryLevelService,
@@ -52,7 +49,6 @@ export default class InventoryService implements IInventoryService {
moduleDeclaration?: InternalModuleDeclaration
) {
this.manager_ = manager
this.eventBusService_ = eventBusService
this.inventoryItemService_ = inventoryItemService
this.inventoryLevelService_ = inventoryLevelService
this.reservationItemService_ = reservationItemService