mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Allow asynchronous instances in injectable typing
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
1 parent
0c0dfe5966
commit
c9503c1d14
5 files changed
+31
-24
No files matched your search
@@ -20,10 +20,10 @@
|
||||
*/
|
||||
|
||||
import { createContainer } from "@ogre-tools/injectable";
|
||||
import type { IConfigurableDependencyInjectionContainer } from "@ogre-tools/injectable";
|
||||
import type { ConfigurableDependencyInjectionContainer } from "@ogre-tools/injectable";
|
||||
|
||||
export const getDi = () => {
|
||||
const di: IConfigurableDependencyInjectionContainer = createContainer(
|
||||
const di: ConfigurableDependencyInjectionContainer = createContainer(
|
||||
() => require.context("./", true, /\.injectable\.(ts|tsx)$/),
|
||||
);
|
||||
|
||||
|
||||
@@ -24,11 +24,11 @@ import { memoize } from "lodash/fp";
|
||||
|
||||
import {
|
||||
createContainer,
|
||||
IConfigurableDependencyInjectionContainer,
|
||||
ConfigurableDependencyInjectionContainer,
|
||||
} from "@ogre-tools/injectable";
|
||||
|
||||
export const getDiForUnitTesting = () => {
|
||||
const di: IConfigurableDependencyInjectionContainer = createContainer();
|
||||
const di: ConfigurableDependencyInjectionContainer = createContainer();
|
||||
|
||||
getInjectableFilePaths()
|
||||
.map(key => {
|
||||
|
||||
Reference in new issue
Block a user