You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/10/05 17:18:12 UTC
[GitHub] kristw commented on a change in pull request #6028: Add data
structures for chart plugin system
kristw commented on a change in pull request #6028: Add data structures for chart plugin system
URL: https://github.com/apache/incubator-superset/pull/6028#discussion_r223080539
##########
File path: superset/assets/src/utils/makeSingleton.js
##########
@@ -0,0 +1,10 @@
+export default function makeSingleton(BaseClass) {
+ let singleton;
+
+ return function getInstance() {
+ if (!singleton) {
+ singleton = new BaseClass();
Review comment:
Interesting idea. I've never defined one with params, but would be nice to support.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org