feat: loosely typed container

This commit is contained in:
Harminder Virk
2024-05-31 15:22:03 +05:30
committed by GitHub
parent 2d956931b3
commit 11528526fa
41 changed files with 255 additions and 114 deletions
@@ -1,11 +1,11 @@
import {
CreatePaymentProviderDTO,
LoaderOptions
} from "@medusajs/types"
import { CreatePaymentProviderDTO, LoaderOptions } from "@medusajs/types"
import { PaymentProviderService } from "@services"
export default async ({ container }: LoaderOptions): Promise<void> => {
const providersToLoad = container.resolve("payment_providers")
const paymentProviderService = container.resolve("paymentProviderService")
const providersToLoad = container.resolve<string[]>("payment_providers")
const paymentProviderService = container.resolve<PaymentProviderService>(
"paymentProviderService"
)
const providers = await paymentProviderService.list({
id: providersToLoad,