server-ts: Address self-review

This commit is contained in:
Elian Doran 2024-04-02 23:55:02 +03:00
parent d4c8d24d50
commit 99d50957dd
No known key found for this signature in database
4 changed files with 24 additions and 24 deletions

View File

@ -10,7 +10,7 @@ if (config.Network.https) {
process.exit(0); process.exit(0);
} }
const port = require('./src/services/port.ts'); const port = require('./src/services/port');
const host = require('./src/services/host'); const host = require('./src/services/host');
const options = { timeout: 2000 }; const options = { timeout: 2000 };

View File

@ -25,7 +25,7 @@ class OrderByAndLimitExp extends Expression {
constructor(orderDefinitions: Pick<OrderDefinition, "direction" | "valueExtractor">[], limit?: number) { constructor(orderDefinitions: Pick<OrderDefinition, "direction" | "valueExtractor">[], limit?: number) {
super(); super();
this.orderDefinitions = orderDefinitions as unknown as OrderDefinition[]; this.orderDefinitions = orderDefinitions as OrderDefinition[];
for (const od of this.orderDefinitions) { for (const od of this.orderDefinitions) {
od.smaller = od.direction === "asc" ? -1 : 1; od.smaller = od.direction === "asc" ? -1 : 1;

View File

@ -45,7 +45,7 @@ function startTrilium() {
* instead of the new one. This is complicated by the fact that it is possible to run multiple instances of Trilium * instead of the new one. This is complicated by the fact that it is possible to run multiple instances of Trilium
* if port and data dir are configured separately. This complication is the source of the following weird usage. * if port and data dir are configured separately. This complication is the source of the following weird usage.
* *
* The line below makes sure that the "second-instance" (process in window) is fired. Normally it returns a boolean * The line below makes sure that the "second-instance" (process in window.ts) is fired. Normally it returns a boolean
* indicating whether another instance is running or not, but we ignore that and kill the app only based on the port conflict. * indicating whether another instance is running or not, but we ignore that and kill the app only based on the port conflict.
* *
* A bit weird is that "second-instance" is triggered also on the valid usecases (different port/data dir) and * A bit weird is that "second-instance" is triggered also on the valid usecases (different port/data dir) and