param pathToClass export async function loadClass < T > ( pathToClass ) { let Class ; try { Class = ( await import ( pathToClass ) ) . default ; } catch ( err ) { throw new Error ( `Could not load class. Expected to find class: ${ pathToClass }.ts. Failed with: ${ err . message }` ) ; } return Class ; }