Following this Stackoverflow question, I am trying to pass options to ES6 imports?
This worked fine:
export default (Param1:any, Param2:any) => {
return class Foo {
constructor() {
console.log(Param1);
}
}
}
But now I need to return more than one class so I tried this:
export default (Param1: any, Param2: any)=>{
class Foo {
constructor() {
console.log(Param1);
}
}
class Bar {
constructor() {
console.log(Param1);
}
}
return {Foo, Bar}
}
But I got the following error on compilation:
TS4060: Return type of exported function has or is using private name Foo TS4060: Return type of exported function has or is using private name Bar
How to pass options to ES6 imports that imports multiple class ?