import { IUserInfo } from '@/typings/userinfo' ; import { loadServiceClass } from '@/utils/class-loader' ; import { IUserServiceProvider } from './providers/IUserServiceProvider' ; let provider ; export async function fetchUserInfo ( ) { const ProviderClass = await loadServiceClass < IUserServiceProvider > ( 'user/providers' , 'UserServiceProvider' ) ; provider = new ProviderClass ( ) ; return provider . fetchUserInfo ( ) ; }