fix(modules-sdk): check if dependency is registered (#3620)
* fix: check if dependency is registered * changeset
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user