@@ -5,8 +5,8 @@ import {
|
||||
Modules,
|
||||
} from "@medusajs/modules-sdk"
|
||||
import { IEventBusService, IStockLocationService } from "@medusajs/types"
|
||||
import { StockLocationServiceInitializeOptions } from "../types"
|
||||
import { moduleDefinition } from "../module-definition"
|
||||
import { StockLocationServiceInitializeOptions } from "../types"
|
||||
|
||||
export const initialize = async (
|
||||
options: StockLocationServiceInitializeOptions | ExternalModuleDeclaration,
|
||||
@@ -15,7 +15,7 @@ export const initialize = async (
|
||||
}
|
||||
): Promise<IStockLocationService> => {
|
||||
const serviceKey = Modules.STOCK_LOCATION
|
||||
const loaded = await MedusaModule.bootstrap(
|
||||
const loaded = await MedusaModule.bootstrap<IStockLocationService>(
|
||||
serviceKey,
|
||||
"@medusajs/stock-location",
|
||||
options as InternalModuleDeclaration | ExternalModuleDeclaration,
|
||||
@@ -23,5 +23,5 @@ export const initialize = async (
|
||||
injectedDependencies
|
||||
)
|
||||
|
||||
return loaded[serviceKey] as IStockLocationService
|
||||
return loaded[serviceKey]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user