export class InstanceLoader { // tslint:disable-next-line:ban-types static getInstance( context: Record, name: string, ...args: any[] ) { const instance = Object.create(context[name].prototype); instance.constructor.apply(instance, args); return instance; } }