import { IArchiver , IAuthenticationStrategy , IRequestContext , IStorages , IUsecaseConfig , } from "@staticdeploy/core" ; import { IUsecasesByName } from "@staticdeploy/http-adapters" ; export default function getMakeUsecase ( usecases , dependencies ) { return < Name extends keyof IUsecasesByName > ( name ) => { const UsecaseClass = usecases [ name ] ; return new UsecaseClass ( dependencies ) as InstanceType < IUsecasesByName [ Name ] > ; } ; }