mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-11 20:08:37 +00:00
build: enhance tsconfig type check (#2732)
This commit is contained in:
@@ -29,13 +29,14 @@ export const quitAndInstall = async () => {
|
||||
let lastCheckTime = 0;
|
||||
export const checkForUpdatesAndNotify = async (force = true) => {
|
||||
if (!_autoUpdater) {
|
||||
return; // ?
|
||||
return void 0;
|
||||
}
|
||||
// check every 30 minutes (1800 seconds) at most
|
||||
if (force || lastCheckTime + 1000 * 1800 < Date.now()) {
|
||||
lastCheckTime = Date.now();
|
||||
return await _autoUpdater.checkForUpdatesAndNotify();
|
||||
}
|
||||
return void 0;
|
||||
};
|
||||
|
||||
export const registerUpdater = async () => {
|
||||
|
||||
@@ -27,6 +27,7 @@ import { contextBridge, ipcRenderer } from 'electron';
|
||||
if (validateIPC(channel)) {
|
||||
return ipcRenderer.invoke(channel, ...args);
|
||||
}
|
||||
return void 0;
|
||||
},
|
||||
|
||||
on(
|
||||
@@ -35,9 +36,8 @@ import { contextBridge, ipcRenderer } from 'electron';
|
||||
) {
|
||||
if (validateIPC(channel)) {
|
||||
ipcRenderer.on(channel, listener);
|
||||
|
||||
return this;
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
||||
once(
|
||||
@@ -46,9 +46,8 @@ import { contextBridge, ipcRenderer } from 'electron';
|
||||
) {
|
||||
if (validateIPC(channel)) {
|
||||
ipcRenderer.once(channel, listener);
|
||||
|
||||
return this;
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
||||
removeListener(
|
||||
@@ -57,9 +56,8 @@ import { contextBridge, ipcRenderer } from 'electron';
|
||||
) {
|
||||
if (validateIPC(channel)) {
|
||||
ipcRenderer.removeListener(channel, listener);
|
||||
|
||||
return this;
|
||||
}
|
||||
return this;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user