mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Change typing for after/before window/application start (#7342)
- Now the callback is provided with an object containing either `mainDi` or `windowDi` fields. This should help with confusion over which environment the `di` is for Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
b99b06980e
commit
a63f737adb
62 files changed
+185
-189
No files matched your search
@@ -50,7 +50,7 @@ describe("channel", () => {
|
||||
injectionToken: messageChannelListenerInjectionToken,
|
||||
});
|
||||
|
||||
builder.beforeWindowStart((windowDi) => {
|
||||
builder.beforeWindowStart(({ windowDi }) => {
|
||||
runInAction(() => {
|
||||
windowDi.register(testChannelListenerInTestWindowInjectable);
|
||||
});
|
||||
@@ -123,7 +123,7 @@ describe("channel", () => {
|
||||
injectionToken: messageChannelListenerInjectionToken,
|
||||
});
|
||||
|
||||
applicationBuilder.beforeApplicationStart((mainDi) => {
|
||||
applicationBuilder.beforeApplicationStart(({ mainDi }) => {
|
||||
runInAction(() => {
|
||||
mainDi.register(testChannelListenerInMainInjectable);
|
||||
});
|
||||
@@ -157,7 +157,7 @@ describe("channel", () => {
|
||||
handler: () => requestListenerInMainMock,
|
||||
});
|
||||
|
||||
applicationBuilder.beforeApplicationStart((mainDi) => {
|
||||
applicationBuilder.beforeApplicationStart(({ mainDi }) => {
|
||||
runInAction(() => {
|
||||
mainDi.register(testChannelListenerInMainInjectable);
|
||||
});
|
||||
@@ -224,7 +224,7 @@ describe("channel", () => {
|
||||
injectionToken: requestChannelListenerInjectionToken,
|
||||
});
|
||||
|
||||
applicationBuilder.beforeApplicationStart((mainDi) => {
|
||||
applicationBuilder.beforeApplicationStart(({ mainDi }) => {
|
||||
runInAction(() => {
|
||||
mainDi.register(someChannelListenerInjectable);
|
||||
mainDi.register(someOtherChannelListenerInjectable);
|
||||
|
||||
@@ -17,13 +17,13 @@ describe("sync-box", () => {
|
||||
beforeEach(() => {
|
||||
applicationBuilder = getApplicationBuilder();
|
||||
|
||||
applicationBuilder.beforeApplicationStart(mainDi => {
|
||||
applicationBuilder.beforeApplicationStart(({ mainDi }) => {
|
||||
runInAction(() => {
|
||||
mainDi.register(someInjectable);
|
||||
});
|
||||
});
|
||||
|
||||
applicationBuilder.beforeWindowStart((windowDi) => {
|
||||
applicationBuilder.beforeWindowStart(({ windowDi }) => {
|
||||
runInAction(() => {
|
||||
windowDi.register(someInjectable);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user