tracker / user-store refactoring, part 1

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman committed 2020-07-05 17:16:50 +03:00
1 parent c9fb015bcf
commit 4270ec4240
23 files changed
+247 -225

No files matched your search

+5 -1
View File
@@ -6,7 +6,8 @@
* const usersStore: UsersStore = UsersStore.getInstance();
*/
export class Singleton {
// todo: maybe convert to @decorator
class Singleton {
private static instances = new WeakMap<object, Singleton>();
// todo: figure out how to infer child class + arguments types
@@ -21,3 +22,6 @@ export class Singleton {
Singleton.instances.delete(this);
}
}
export { Singleton }
export default Singleton;