mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Introduce injection token as competition for injectable setup to have better control of timing of different setups
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com> Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
1 parent
9f25212f45
commit
b8fd1299ee
2 files changed
+26
-1
No files matched your search
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectionToken } from "@ogre-tools/injectable";
|
||||
|
||||
export interface Setupable {
|
||||
doSetup: () => Promise<void> | void;
|
||||
}
|
||||
|
||||
export const setupableInjectionToken = getInjectionToken<Setupable>({
|
||||
id: "setupable-injection-token",
|
||||
});
|
||||
Reference in new issue
Block a user