mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
tracker / user-store refactoring, part 1
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
1 parent
c9fb015bcf
commit
4270ec4240
23 files changed
+247
-225
No files matched your search
@@ -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;
|
||||
Reference in new issue
Block a user