I want create object factory using ES6 but old-style syntax doesn\'t work with new.
I have next code:
export class Column {} export class Sequence {}
I prefer this method:
allThemClasses.js
export class A {} export class B {} export class C {}
script.js
import * as Classes from './allThemClasses'; const a = new Classes['A']; const b = new Classes['B']; const c = new Classes['C'];