Merge pull request #48 from TriliumNext/feature/typescript_backend_11

Convert backend to TypeScript (89% -> 92%, final)
This commit is contained in:
Elian Doran
2024-04-20 09:37:19 +03:00
committed by GitHub
12 changed files with 216 additions and 137 deletions

View File

@@ -76,7 +76,7 @@ function error(message: string) {
const requestBlacklist = [ "/libraries", "/app", "/images", "/stylesheets", "/api/recent-notes" ];
function request(req: Request, res: Response, timeMs: number, responseLength = "?") {
function request(req: Request, res: Response, timeMs: number, responseLength: number | string = "?") {
for (const bl of requestBlacklist) {
if (req.url.startsWith(bl)) {
return;

View File

@@ -81,7 +81,7 @@ async function createMainWindow(app: App) {
app.on('second-instance', () => {
// Someone tried to run a second instance, we should focus our window.
// see www.js "requestSingleInstanceLock" for the rest of this logic with explanation
// see www.ts "requestSingleInstanceLock" for the rest of this logic with explanation
if (mainWindow) {
if (mainWindow.isMinimized()) {
mainWindow.restore();