this
JS-0105 11 }
12
13 // eslint-disable-next-line @typescript-eslint/no-empty-function
14 public async testConnectionAsync(): Promise<void> {} 15}
16
17describe("Base integration", () => {
35 */
36 public abstract testConnectionAsync(): Promise<void>;
37
38 protected async handleTestConnectionResponseAsync({ 39 queryFunctionAsync,
40 handleResponseAsync,
41 }: {
30export let database: HomarrDatabase;
31
32class WinstonDrizzleLogger implements Logger {
33 logQuery(query: string, _: unknown[]): void {34 logger.debug(`Executed SQL query: ${query}`);
35 }
36}
13 logger.info(message);
14 }
15
16 logError(error: unknown) {17 logger.error(error);
18 }
19}
9 logger.debug(message);
10 }
11
12 logInfo(message: string) {13 logger.info(message);
14 }
15
If a class method does not use this
, it can sometimes be made into a static function. If you do convert the method into a static function, instances of the class that call that particular method have to be converted to a static call as well (MyClass.callStaticMethod())
class Person {
sayHi() {
const greeting = document.createElement("div");
greeting.innerText = "Hello!";
document.appendChild();
}
}
const person = new Person();
person.sayHi();
class Person {
static sayHi() {
const greeting = document.createElement("div");
greeting.innerText = "Hello!";
document.appendChild();
}
}
Person.sayHi();