feat: make AbstractModuleService create method type-safe (#11216)

This commit is contained in:
Harminder Virk authored and GitHub committed 2025-02-03 21:25:01 +05:30
1 parent 6cd8249a2c
commit 016e332e9b
23 files changed
+677 -35

No files matched your search

@@ -54,11 +54,13 @@ export default class StoreModuleService
data: StoreTypes.CreateStoreDTO[],
sharedContext?: Context
): Promise<StoreTypes.StoreDTO[]>
// @ts-expect-error
async createStores(
data: StoreTypes.CreateStoreDTO,
sharedContext?: Context
): Promise<StoreTypes.StoreDTO>
@InjectManager()
// @ts-expect-error
async createStores(
data: StoreTypes.CreateStoreDTO | StoreTypes.CreateStoreDTO[],
@MedusaContext() sharedContext: Context = {}
@@ -131,12 +133,14 @@ export default class StoreModuleService
data: StoreTypes.UpdateStoreDTO,
sharedContext?: Context
): Promise<StoreTypes.StoreDTO>
// @ts-expect-error
async updateStores(
selector: StoreTypes.FilterableStoreProps,
data: StoreTypes.UpdateStoreDTO,
sharedContext?: Context
): Promise<StoreTypes.StoreDTO[]>
@InjectManager()
// @ts-expect-error
async updateStores(
idOrSelector: string | StoreTypes.FilterableStoreProps,
data: StoreTypes.UpdateStoreDTO,