Allow asynchronous instances in injectable typing

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen committed 2021-11-26 07:44:30 +02:00
1 parent 0c0dfe5966
commit c9503c1d14
5 files changed
+31 -24

No files matched your search

+2 -2
View File
@@ -52,7 +52,7 @@ import { AppPaths } from "../common/app-paths";
import { registerCustomThemes } from "./components/monaco-editor";
import { getDi } from "./components/getDi";
import { DiContextProvider } from "@ogre-tools/injectable-react";
import type { IDependencyInjectionContainer } from "@ogre-tools/injectable";
import type { DependencyInjectionContainer } from "@ogre-tools/injectable";
if (process.isMainFrame) {
SentryInit();
@@ -76,7 +76,7 @@ type AppComponent = React.ComponentType & {
init(rootElem: HTMLElement): Promise<void>;
};
export async function bootstrap(comp: () => Promise<AppComponent>, di: IDependencyInjectionContainer) {
export async function bootstrap(comp: () => Promise<AppComponent>, di: DependencyInjectionContainer) {
const rootElem = document.getElementById("app");
const logPrefix = `[BOOTSTRAP-${process.isMainFrame ? "ROOT" : "CLUSTER"}-FRAME]:`;