mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Enhance typing of channels and sync-box
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
ec7c806dc0
commit
b78b7887ab
15 files changed
+52
-29
No files matched your search
+4
-1
@@ -4,6 +4,7 @@
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import createSyncBoxInjectable from "../../sync-box/create-sync-box.injectable";
|
||||
import type { UpdateChannel } from "../../../main/update-app/update-channels";
|
||||
|
||||
const discoveredUpdateVersionInjectable = getInjectable({
|
||||
id: "discovered-update-version",
|
||||
@@ -11,7 +12,9 @@ const discoveredUpdateVersionInjectable = getInjectable({
|
||||
instantiate: (di) => {
|
||||
const createSyncBox = di.inject(createSyncBoxInjectable);
|
||||
|
||||
return createSyncBox("discovered-update-version");
|
||||
return createSyncBox<{ version: string; updateChannel: UpdateChannel }>(
|
||||
"discovered-update-version",
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ const progressOfUpdateDownloadInjectable = getInjectable({
|
||||
instantiate: (di) => {
|
||||
const createSyncBox = di.inject(createSyncBoxInjectable);
|
||||
|
||||
return createSyncBox("progress-of-update-download");
|
||||
return createSyncBox<number>("progress-of-update-download");
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ const updateIsBeingDownloadedInjectable = getInjectable({
|
||||
instantiate: (di) => {
|
||||
const createSyncBox = di.inject(createSyncBoxInjectable);
|
||||
|
||||
return createSyncBox("update-is-being-downloaded");
|
||||
return createSyncBox<boolean>("update-is-being-downloaded");
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ const updatesAreBeingDiscoveredInjectable = getInjectable({
|
||||
instantiate: (di) => {
|
||||
const createSyncBox = di.inject(createSyncBoxInjectable);
|
||||
|
||||
return createSyncBox("updates-are-being-discovered");
|
||||
return createSyncBox<boolean>("updates-are-being-discovered");
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user