1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/renderer/app-paths/get-value-from-registered-channel/get-value-from-registered-channel.injectable.ts
Janne Savolainen 096aed6aba Update version of injectable for
- Allow hierarchy of setuppables
- Detection of circular injections
- Detection of circular setuppables
- Better error messages for injecting non-registered injectables
- Introduce injectMany as new pattern
- Introduce keyed singletons as new lifecycle
- Allow instantiation parameter of any type

Adapt to new version of injectable

Remove explicit singleton as lifecycle for being default

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2022-02-24 14:16:22 -05:00

17 lines
643 B
TypeScript

/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import ipcRendererInjectable from "./ipc-renderer/ipc-renderer.injectable";
import { getValueFromRegisteredChannel } from "./get-value-from-registered-channel";
const getValueFromRegisteredChannelInjectable = getInjectable({
id: "get-value-from-registered-channel",
instantiate: (di) =>
getValueFromRegisteredChannel({ ipcRenderer: di.inject(ipcRendererInjectable) }),
});
export default getValueFromRegisteredChannelInjectable;