would that be tricky with the way you're using `makeSingleton` currently (i.e., 
exporting the value returned by `makeSingleton(...)`)? what about pushing the 
args to where you would be instantiating it?

```javascript
function makeSingleton(BaseClass) {
  return function getInstance(...args) {
    ...
    singleton = new BaseClass(...args);
    ...
  };
}

// usage
const MyInstance = getInstance(args);
```

I guess that's a little weird in the case that you call `getInstance()` with 
args, and the instance already exists (then consumers might think it's getting 
configured with the current args when it's not) 🤔 I'm cool with the API you 
suggested also.

[ Full content available at: 
https://github.com/apache/incubator-superset/pull/6028 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org

Reply via email to