From 6065940269c6190e29d0d02ca228bacba5adea24 Mon Sep 17 00:00:00 2001 From: Chongyi Zheng Date: Sat, 16 Sep 2023 01:30:30 -0400 Subject: [PATCH] Fix comments regarding typing --- db/knex_init_db.js | 2 +- server/database.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/db/knex_init_db.js b/db/knex_init_db.js index 744153ca3..c97cbf8e1 100644 --- a/db/knex_init_db.js +++ b/db/knex_init_db.js @@ -5,7 +5,7 @@ const { log } = require("../src/util"); * ⚠️⚠️⚠️⚠️⚠️⚠️ DO NOT ADD ANYTHING HERE! * IF YOU NEED TO ADD FIELDS, ADD IT TO ./db/knex_migrations * See ./db/knex_migrations/README.md for more information - * @param {string} dbType "mariadb" or "postgres" + * @param {"mariadb"|"postgres"} dbType database type, should be either "mariadb" or "postgres" * @returns {Promise} */ async function createTables(dbType) { diff --git a/server/database.js b/server/database.js index 070637806..8842fbe99 100644 --- a/server/database.js +++ b/server/database.js @@ -138,7 +138,7 @@ class Database { * Read the database config * @throws {Error} If the config is invalid * @typedef {string|undefined} envString - * @returns {{type: "sqlite" | "mariadb" | "embedded-mariadb" | "postgres"} | {type:envString, hostname:envString, port:envString, database:envString, username:envString, password:envString}} Database config + * @returns {{type: "sqlite"} | {type:envString, hostname:envString, port:envString, database:envString, username:envString, password:envString}} Database config */ static readDBConfig() { let dbConfig; @@ -158,7 +158,7 @@ class Database { /** * @typedef {string|undefined} envString - * @param {{type: "sqlite" | "mariadb" | "embedded-mariadb" | "postgres"} | {type:envString, hostname:envString, port:envString, database:envString, username:envString, password:envString}} dbConfig the database configuration that should be written + * @param {{type: "sqlite"} | {type:envString, hostname:envString, port:envString, database:envString, username:envString, password:envString}} dbConfig the database configuration that should be written * @returns {void} */ static writeDBConfig(dbConfig) {